Input argument in function undefined
1 次查看(过去 30 天)
显示 更早的评论
Whenever I run this code I get this error. The code is attached. The error is:
??? Input argument "sym" is undefined.
Error in ==> ARM_deco at 10 if(length(sym)==length(p) && sum(p)==1)
回答(1 个)
Image Analyst
2014-11-1
how did you call Arithmetic_dec(sym,p,tagword)? Did you just click on the green triangle, which doesn't supply any input arguments (I think this was most likely what you did), or did you give a bad value for sym, like
Arithmetic_dec([],1,'bombs')
5 个评论
Image Analyst
2014-11-1
Why don't you make a tests script to assign input variables and call this function? If you just want to click the green triangle, then don't have any arguments at all and just assign them inside the function. Or get rid of the function line and turn it into a simple script.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!