I Have this code where i'm trying to make 2 different plots in respect to one of the variables but when i run the code i get no errors and the plots appear but are empty. Not sure what im doing wrong. Using the Aerospace add on
Mdot=2624;
Ve=2580.87;
Pe=50;
Ae=43.008;
Go=9.81;
Pinf=101.3:0.000032;
Alt= atmospalt(Pinf);
F=Mdot * Ve + (Pe-Pinf)*Ae;
Isp=F/(Go*Mdot);
figure
title('Thust vs. Alt')
xlabel('Alt')
ylabel('Thrust')
plot(F,Alt);
hold on
figure
title('Isp vs. Alt')
xlabel('Alt')
ylabel('Isp')
plot(Isp,Alt);hold on

 Réponse acceptée

Pinf is empty
Pinf=101.3:0.000032
Pinf = 1×0 empty double row vector
so Alt, F, and Isp are also empty; therefore the plots are empty.
What is the intended value of Pinf?

3 commentaires

Michael Howard
Michael Howard le 22 Jan 2024
Pinf is supposed to be the air pressure at sea level (101.3 KPa) to the pressure at an altitude of 100000 m (3.19*10^-5 KPa)
Then you must interchange the two limits:
Pinf=0.000032:101.3
Or better use
Pinf = linspace(0.000032,101.3,100)
Michael Howard
Michael Howard le 23 Jan 2024
Thank you that seamed to work

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Produits

Version

R2023b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by