Plots not displaying any information

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

 Accepted Answer

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 Comments

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)
Thank you that seamed to work

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products

Release

R2023b

Tags

Community Treasure Hunt

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

Start Hunting!