Too many input arguments.
古いコメントを表示
Hi everyone, I have this fucntion and I get error during the running
function f = objCemaNeigesce(x,userdata)
Pt = userdata( :,1 ) ;
Tmoy = userdata( :,2 ) ;
Tmin = userdata( :,3 ) ;
Tmax = userdata( :,4 ) ;
lame_deau = userdata( :,5 ) ;
Zz = x.Zz ;
ZmedBV = x.ZmedBV ;
Beta = x.ZmedBV ;
gradT = x.gradT ;
Tf = x.Tf ;
Vmin = x.Vmin ;
QNBV = x.QNBV ;
[lame_deau,perf] = CemaNeige( Pt, lame_deau, Tmoy, Tmax, Tmin, Zz, ZmedBV, Beta, gradT, Tf, QNBV, Vmin);
f = perf(1) ;
Here is error I get :
>> objCemaNeigesce(x,userdata)
Error using CemaNeige
Too many input arguments.
Error in objCemaNeigesce (line 25)
[lame_deau,perf] = CemaNeige( Pt, lame_deau, x,
Tmoy, Tmax, Tmin, Zz, ZmedBV, Beta, gradT, Tf,
QNBV, Vmin);
Someone can help me?
Thank
2 件のコメント
Steven Lord
2022 年 6 月 28 日
You haven't showed us the definition of the CemaNeige function, but apparently from the error message it is not defined to accept 13 input arguments. It is defined to accept fewer than 13 inputs.
You're passing into CemaNeige the inputs you unpacked from the userdata input of objCemaNeigesce in a different order than they're arranged in userdata. To me that smells like it will cause a problem for users of objCemaNeigesce and/or CemaNeige at some point, where they'll pass the inputs into objCemaNeigesce in the order that CemaNeige expects or vice versa. At the very least one or both functions should have help text clearly indicating their calling signature.
Otthman Otth
2022 年 6 月 28 日
編集済み: dpb
2022 年 6 月 28 日
採用された回答
その他の回答 (1 件)
カテゴリ
ヘルプ センター および File Exchange で Biotech and Pharmaceutical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!