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
Oleg Komarov 2012 年 5 月 21 日
Post (edit) the entire error message and the line of code that generated the error.

サインインしてコメントする。

回答 (1 件)

Sean de Wolski
Sean de Wolski 2012 年 5 月 21 日

1 投票

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
Jan 2012 年 5 月 22 日
Especially the function "nargin" is called with more than 1 output in the OPs case.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeFunction Creation についてさらに検索

タグ

質問済み:

2012 年 5 月 21 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by