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

 채택된 답변

Voss
Voss 2024년 1월 22일

0 개 추천

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

Michael Howard
Michael Howard 2024년 1월 22일
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 2024년 1월 23일
Thank you that seamed to work

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

릴리스

R2023b

태그

질문:

2024년 1월 22일

댓글:

2024년 1월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by