Error while using Nargin
显示 更早的评论
While using function nargin for a user defined function...matlab posts the follwing error:
'Too many output arguments.' What is the cause for this problem and how to solve this?? Please help me...
1 个评论
Oleg Komarov
2012-5-21
Post (edit) the entire error message and the line of code that generated the error.
回答(1 个)
Sean de Wolski
2012-5-21
It means you are calling the function with more outputs than are defined in it.
If your function is:
function y = fun(x)
and you call
[z w] = fun(x)
It will throw this error.
1 个评论
Jan
2012-5-22
Especially the function "nargin" is called with more than 1 output in the OPs case.
类别
在 帮助中心 和 File Exchange 中查找有关 Function Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!