MATLAB Error -- "Not enough input arguments"
10 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
採用された回答
Star Strider
2014 年 11 月 22 日
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!