Need help calculating thrust required curve

19 次查看(过去 30 天)
I need to calculate a thrust required curve for an aircraft to find the velocity at maximum lift-drag ratio. I keep getting errors; either it says that 'v' is undefined or that there aren't enough input arguments. No, I don't have a specific value for velocity, the curve is supposed to tell me that. Please help.
%initial data
function fval=TRc(v)
rho=1.225; %kg/m^3
s=47; %m^2
AR=6.5; %unitless
e=0.87; %unitless
w=103047; %N
cd0=0.032; %unitless
ET=40298; %N%engine thrust
PA=2*ET; %N
cl = (2*w)/(v^2*rho*s); %lift coefficient
cd=cd0+(cl^2/(pi*e*AR)); %drag coefficient
TR=w/(cl/cd); %N
PR=TR*v; %W
fval=(PA-PR)/w;
plot(v,fval);
end

采纳的回答

Torsten
Torsten 2023-2-23
移动:Torsten 2023-2-23
You must call TRc with a numerical input vector for v to get a plot.
v = linspace(1,20,100);
fval = TRc(v);
plot(v,fval)
function fval=TRc(v)
rho=1.225; %kg/m^3
s=47; %m^2
AR=6.5; %unitless
e=0.87; %unitless
w=103047; %N
cd0=0.032; %unitless
ET=40298; %N%engine thrust
PA=2*ET; %N
cl = (2*w)./(v.^2*rho*s); %lift coefficient
cd=cd0+(cl.^2/(pi*e*AR)); %drag coefficient
TR=w./(cl./cd); %N
PR=TR.*v; %W
fval=(PA-PR)./w;
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by