How to adjust when there are Too Many Arguments?
2 views (last 30 days)
Show older comments
I am now analysing my data with MatLab 2012, spm 5 and another program, Nedica. I have already done the same type of analysis with the same data, but with and anterior version of MatLab. Right now, MatLab 2012 is warning me that my data have too many arguments (4 arguments). It seems like the "vr" argument should not be included. Is there a patch or something that could solve my problem and allow me to use MatLab 2012?
Thanks,
Francis
1 Comment
Image Analyst
on 19 Nov 2012
There is no information for us to answer this. You didn't supply any code. Plus, data does not have arguments - functions have arguments. But you did not tell us how your function is defined so we don't know if it takes 2, 3, 4, or some other number of arguments. This is not something that MATLAB would need to issue a patch for - you just need to write your program correctly.
Accepted Answer
Francis
on 19 Nov 2012
1 Comment
Image Analyst
on 19 Nov 2012
You accepted your answer, so apparently the question is solved - is that correct? So you figured out that you just leave off the fourth output argument, which is not used anymore. Like this:
[pathstr,name,extr] = fileparts(exportname);
You can't replace versn with ~ because there is no longer any 4th output argument to replace. You can only do that if there is something returned that you want to ignore. Even then you don't need to include them if they're at the end of the list, only if you want to ignore something early in the list and keep something later in the list.
More Answers (1)
Jan
on 19 Nov 2012
Edited: Jan
on 19 Nov 2012
It cannot be the data, which have too many arguments, but only a function. So at first read the documentation of this function (help, doc, edit) and check how this function is called. Then start the debugger:
dbstop if error
and let the program run again. Then Matlab stops when the problem occurs and you can check the calling sequence and values of the local variables.
Please note, that we cannot guess what you are talking about. A copy of the complete error message and the line, which causes the error, is the minimum requirement for an efficient answer.
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!