Error while using Nargin

8 Ansichten (letzte 30 Tage)
Kishore adibhatla
Kishore adibhatla am 21 Mai 2012
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 Kommentar
Oleg Komarov
Oleg Komarov am 21 Mai 2012
Post (edit) the entire error message and the line of code that generated the error.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sean de Wolski
Sean de Wolski am 21 Mai 2012
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 Kommentar
Jan
Jan am 22 Mai 2012
Especially the function "nargin" is called with more than 1 output in the OPs case.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Function Creation finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by