Subplot output data seen in two different window.

1 Ansicht (letzte 30 Tage)
ulas can ozak
ulas can ozak am 7 Mai 2023
Kommentiert: ulas can ozak am 7 Mai 2023
How can i put these figures in same window?
clear all;
close all;
clc;
f=40;
v=380;
p=2;
r_1=0.31; x_1=0.5; r_2=0.155; x_2=0.25; x_m=12.5;
w_e=(f/p)*60;
v1=v/sqrt(3);
s=0:0.01:1;
for i=1:length(s)
W_r(i) = (1-s(i))*w_e
Z_in(i) = r_1 + x_1*1i + 1/(x_m*1i) + 1/( x_2*1i + r_2/s(i) )
i_1(i) = v1 / Z_in(i)
i_1_f(i) = abs(i_1(i))
pf(i) = cos( angle( i_1(i) ) )
i_2(i) = ( v1 - i_1(i) * (r_1 + x_1*1i) ) / (x_2*1i +( r_2/s(i) ) );
i_2_f(i) = abs(i_2(i));
i_m(i) = ( v1 - i_1(i) * ( r_1 + x_1*1i ) ) / ( x_m*1i );
T_m(i) = ( 3/w_e ) * ( r_2/s(i) ) * i_2_f(i)^2
P_in(i) = sqrt(3) * v * i_1_f(i) * cos( angle( i_1(i) ) )
P_out(i) = 3 * ( r_2/s(i) ) * ( 1-s(i) ) * i_2_f(i)^2
verim(i)= P_out(i) / P_in(i)
end;
for u=1:length(s)
W_ry(u) = (1-s(u))*w_e;
Z_iny(u) = (x_1 + x_2)*1i + r_2/s(u);
iy(u) = v1 / Z_iny(u);
i_f(u) = abs(iy(u));
pfy(u) = cos( angle( iy(u) ) );
T_my(u) = ( 3/w_e ) * ( r_2/s(u) ) * i_f(u)^2;
P_iny(u) = sqrt(3) * v * i_f(u) * cos( angle( iy(u) ) );
P_outy(u) = 3 * ( r_2/s(u) ) * ( 1-s(u) ) * i_f(u)^2;
verimy(u)= P_outy(u) / P_iny(u);
end;
subplot(4,2,1);
plot(W_r,T_m); grid; title('Moment-Hız (T- Eşdeğer Devre)');
xlabel('W_r'); ylabel('T_m');
subplot(4,2,2);
plot(W_r,i_1_f); grid; title('Stator Akımı-Hız(T- Eşdeğer Devre)');
xlabel('W_r'); ylabel('I_1'); legend('Stator Akımı','Location','SouthWest');
subplot(4,2,3);
plot(W_r,P_out); grid; title('cıkıs Gücü-Hız (T- Eşdeğer Devre)');
xlabel('W_r'); ylabel('P_out'); legend('P_out','Location','NorthWest');
subplot(4,2,4);
plot(W_r,verim); grid; title('Verim-Hız (T- Eşdeğer Devre)');
xlabel('W_r'); ylabel('Verim');
subplot(4,2,5);
plot(W_ry,T_my); grid; title('Moment-Hız (Yaklaşık Eşdeğer Devre)');
xlabel('W_r'); ylabel('T_m');
subplot(4,2,6);
plot(W_ry,i_f); grid; title('Stator Akımı-Hız (Yaklaşık Eşdeğer Devre)');
xlabel('W_r'); ylabel('I'); figure;
subplot(4,2,7);
plot(W_ry,P_outy); grid; title('cıkıs Gücü-Hız (Yaklaşık Eşdeğer Devre)');
xlabel('W_r'); ylabel('P_out'); legend('P_out','Location','NorthWest');
subplot(4,2,8);
plot(W_ry,verimy); grid; title('Verim-Hız (Yaklaşık Eşdeğer Devre)');
xlabel('W_r'); ylabel('Verim');

Antworten (2)

Cris LaPierre
Cris LaPierre am 7 Mai 2023
Remove the figure command from your code here:
plot(W_ry,i_f); grid; title('Stator Akımı-Hız (Yaklaşık Eşdeğer Devre)');
xlabel('W_r'); ylabel('I'); figure; % <---------------- Here
subplot(4,2,7);

the cyclist
the cyclist am 7 Mai 2023
On this line of your code
xlabel('W_r'); ylabel('I'); figure;
the figure command is creating a new figure window. Don't call that figure command.

Kategorien

Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by