Hi I have used mcc to convert a Matlab function into a standalone .exe. when I run the .exe file in the windows command prompt it returns the following error:
- too many input arguments // when I give two inputs which is supposed to be
- the first argument should have as many column as input variables as many rows as independent set of input values // when I give one input.
I used the command to build standalone : "mcc -mv myfile.m -a datfile.fis" ----------- building process is ok. But when I run with this command " myfile.exe 2.0 20.2 "in windows prompt it gives above errors. My program takes two inputs and gives one output. I have run Matlab tutorial magicsquare.m to convert magicsquare.exe on the same computer and works fine Can anyone help please? note before conversion the program runs fine in matlab I am given input as follows in MATLAB
myfile ([2.0 20.2])
myfile([2.0 20.2])works correctly inside Matlab, then your function clearly only takes one input, since[2.0 20.2]is one variable (specifically a 2*1 vector). Further, I believe that any input from the Windows command line is interpreted by "compiled" Matlab as a string, so you'll need to use string inputs to your function then convert them usingstr2numat the top of your function. - Colin T Bowers