i am not able to get graph

2 Ansichten (letzte 30 Tage)
Sanjay N
Sanjay N am 23 Mär. 2022
Kommentiert: Star Strider am 23 Mär. 2022
H= 2.7
E= 1.05
V=1
g=5000000
p=5000000
f=50
dt=0.05
omega=0
base=g
G=g/base
M=(H*G)/(180*f)
Xs=0.4
Xe=1
pt=1
delta=asin((pt*Xs)/(E*V))
delta_d=delta*180/pi
dd=1
for t=0:0.05:0.5
pe_n=(E*V*sin(delta)/Xe)
pe=1-pe_n
pa=pe/M
if t==0
pa=pa/2
else
pa=pa
end
d_omega=pa*dt
omega=omega+d_omega
d_delta=omega*dt
plot(t,delta_d)
xlabel('in seconds')
ylabel('in \delta(degree')
delta_d=d_delta+delta_d
dd=dd+1
end

Akzeptierte Antwort

Star Strider
Star Strider am 23 Mär. 2022
Try this —
H= 2.7;
E= 1.05;
V=1;
g=5000000;
p=5000000;
f=50;
dt=0.05;
omega=0;
base=g;
G=g/base;
M=(H*G)/(180*f);
Xs=0.4;
Xe=1;
pt=1;
delta=asin((pt*Xs)/(E*V));
delta_d=delta*180/pi;
dd=1;
tv=0:0.05:0.5;
figure
hold on
for k = 1:numel(tv)
t = tv(k);
pe_n=(E*V*sin(delta)/Xe);
pe=1-pe_n;
pa=pe/M;
if t==0
pa=pa/2;
else
pa=pa;
end
d_omega=pa*dt;
omega=omega+d_omega;
d_delta = omega*dt;
plot(t,delta_d, 'p');
xlabel('in seconds')
ylabel('in \delta(degree')
delta_d=d_delta+delta_d;
dd=dd+1;
end
hold off
Plotting individual points in the loop requires plotting with a marker.
.
  10 Kommentare
Sanjay N
Sanjay N am 23 Mär. 2022
got it scalars have no direction and vector has direction
Star Strider
Star Strider am 23 Mär. 2022
Not annoying at all!
Just short time intervals. I cannot immediately respond.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Variables finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by