Need help calculating thrust required curve

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

 Respuesta aceptada

Torsten
Torsten el 23 de Feb. de 2023
Movida: Torsten el 23 de Feb. de 2023
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

Más respuestas (0)

Categorías

Más información sobre Nonlinear Dynamics en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 23 de Feb. de 2023

Movida:

el 23 de Feb. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by