MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayTo resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Asked by Francis on 19 Nov 2012

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

*No products are associated with this question.*

Answer by Francis on 19 Nov 2012

Accepted answer

I understand what you're asking me but I don't have access to my computer and to MatLab right now, but I would still need some support. In fact, my function is running with four output arguments: [pathstr,name,extr,versn] = fileparts(exportname). Since MatLab 2011, they need the fourth argument to be removed. I'm a newbie and I would like to know (in details) how to remove this fourth argument. I've read that I had to replace the fourth argument with the ~ notation, but when? where? how? Thanks you so much for your patience

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.

Answer by Jan Simon on 19 Nov 2012

Edited by Jan Simon 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.

## 1 Comment

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/54073#comment_111872

There is no information for us to answer this. You didn't supply any code. Plus,

datadoes not have arguments -functionshave 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.