i am not able to get graph

2 次查看(过去 30 天)
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

采纳的回答

Star Strider
Star Strider 2022-3-23
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 个评论
Sanjay N
Sanjay N 2022-3-23
got it scalars have no direction and vector has direction
Star Strider
Star Strider 2022-3-23
Not annoying at all!
Just short time intervals. I cannot immediately respond.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Variables 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by