MATLAB Error -- "Not enough input arguments"

10 visualizaciones (últimos 30 días)
Jooseppi Luna
Jooseppi Luna el 22 de Nov. de 2014
Comentada: Star Strider el 22 de Nov. de 2014
Hello All,
For my first post I have a question about an error that I am getting while trying to run a function that calculates some parametrics for a wind turbine. Without further ado, here is the code:
function [BladeAngle, BladeChord, R] = designBlade_TuesPM(NumBlades, Radius, TSR, VWind )
%Intermediate Variables
Vtip = TSR*VWind;
R = 0:0.0222222222:0.2;
Vr = Vtip*(R/Radius);
%Outputs
BladeAngle = atan(3*Vr/(2*VWind));
BladeChord = (8.*pi.*R.*VWind.*cos(BladeAngle))./(3.*Vr.*0.8.*NumBlades);
Here is the error I get while trying to run it:
>> NumBlades = 3;
>> Radius = .2;
>> TSR = 5;
>> VWind = 1;
>> designBlade_TuesPM
Error using designBlade_TuesPM (line 4)
Not enough input arguments.
It seems to me like I should have enough inputs for line four. What's going wrong here?

Respuesta aceptada

Star Strider
Star Strider el 22 de Nov. de 2014
You need to use it in your script (preferably not always from the Command Window) as:
[BladeAngle, BladeChord, R] = designBlade_TuesPM(NumBlades, Radius, TSR, VWind )
so that you give it values for: NumBlades, Radius, TSR, and VWind, and in return it provides you with values for: BladeAngle, BladeChord, and R.
Also, consider using:
BladeAngle = atan2(3*Vr, (2*VWind));
if you get dodgy values for BladeAngle.
  2 comentarios
Jooseppi Luna
Jooseppi Luna el 22 de Nov. de 2014
Thanks! That helps a lot.
Star Strider
Star Strider el 22 de Nov. de 2014
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by