not getting plot , why?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
for h=0:100:1200
rho = 1.225*((288-0.0065*h)/288)^4.2561;
sigma=0.047193;
V_tip=180;
W=180;
Cd_avg=0.01;
R=2.235;
k=1.1;
A=pi*R.^2;
P_e= 61147.4;
P_req=k*((W)^(3/2))./sqrt(2.*rho.*A)+(Cd_avg*rho*sigma*A.*(V_tip).^3)./(8) +747.643-(0.3*P_e);
V_c=(P_e-P_req)./W;
hold on
plot(V_c,h,'r--');
xlabel("vc");
ylabel("h");
plot(P_req,h,'b')
end
0 commentaires
Réponses (1)
Alan Stevens
le 8 Mar 2021
Arrange it like this
sigma=0.047193;
V_tip=180;
W=180;
Cd_avg=0.01;
R=2.235;
k=1.1;
A=pi*R.^2;
P_e= 61147.4;
h=0:100:1200;
for i = 1:numel(h)
rho = 1.225*((288-0.0065*h(i))/288)^4.2561;
P_req(i)=k*((W)^(3/2))./sqrt(2.*rho.*A)+(Cd_avg*rho*sigma*A.*(V_tip).^3)./(8) +747.643-(0.3*P_e);
V_c(i)=(P_e-P_req(i))./W;
end
subplot(2,1,1)
plot(V_c,h,'r--');
xlabel("vc");
ylabel("h");
subplot(2,1,2)
plot(P_req,h,'b')
xlabel("preq");
ylabel("h");
2 commentaires
Alan Stevens
le 8 Mar 2021
Change
subplot(2,1,1)
plot(V_c,h,'r--');
xlabel("vc");
ylabel("h");
subplot(2,1,2)
plot(P_req,h,'b')
xlabel("preq");
ylabel("h");
to
plot(V_c,h,'r--',P_req,h,'b');
xlabel("vc and preq");
ylabel("h");
Voir également
Catégories
En savoir plus sur Instrument Control Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!