i am not able to get graph

2 vues (au cours des 30 derniers jours)
Sanjay N
Sanjay N le 23 Mar 2022
Commenté : Star Strider le 23 Mar 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

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Variables dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by