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!