Error while using Nargin
조회 수: 9 (최근 30일)
이전 댓글 표시
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Function Creation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!