why i getting Output argument error ?

1 Ansicht (letzte 30 Tage)
lina
lina am 30 Dez. 2014
Kommentiert: Star Strider am 30 Dez. 2014
I wrote this function code but I want to know why I getting this error
Error in ==> WvPr at 19 g = 9.8; % gravity acceleration in m/s^2
??? Output argument "HmoJfl" (and maybe others) not assigned during call to "C:\Users\Mac\Documents\MATLAB\WvPr.m>WvPr".
Error in ==> Untitled at 7 [HmoJfl,TpJfl,HmoJfd,TpJfd,HmoPMfd,TpPMfd]=WvPr(U10,X);
and if You can help me to correct it I'm really thank you :(
THANK YOU IN ADVECE

Antworten (2)

Matt J
Matt J am 30 Dez. 2014
The first line of the function WvPr() has a list of output arguments
HmoJfl,TpJfl,HmoJfd,TpJfd,HmoPMfd,TpPMfd
that it promises to return. However, this promise is not being fulfilled. The error message means that these variables are not computed anywhere in the mfunction.
  4 Kommentare
per isakson
per isakson am 30 Dez. 2014
Start to use the debugging features to find out what is going on in your code.
lina
lina am 30 Dez. 2014
ok, thank you

Melden Sie sich an, um zu kommentieren.


Star Strider
Star Strider am 30 Dez. 2014
Check the value of ‘U10’. By my calculations, if it is <28540, ‘Cd’<1, ‘m’ will be empty, and none of the loops will ever execute.
  6 Kommentare
lina
lina am 30 Dez. 2014
ok I will check right now thank you very much for these explanations
Star Strider
Star Strider am 30 Dez. 2014
My pleasure!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by