Matlab file converted into standalone application and given input arguments
古いコメントを表示
Hi I have converted a Matlab program into standalone program .exe. when I run .exe file in windows command prompt it return the following error
1. two many input arguments // when I give two inputs which is supposed to be 2. 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
4 件のコメント
Jurgen
2013 年 1 月 20 日
what exactly did you type in the command prompt?
Image Analyst
2013 年 1 月 20 日
And in the opening code of your program (OpenFcn if you used GUIDE), let's see how you handled inputs in the input arg list. Did you hard code specific variables in there, or did you use varargin? If you used varargin, let's see how you extracted variables from it.
Jian Dong
2013 年 1 月 21 日
Jian Dong
2013 年 1 月 21 日
編集済み: Walter Roberson
2013 年 1 月 21 日
採用された回答
その他の回答 (1 件)
Image Analyst
2013 年 1 月 21 日
Try it this way
function out = myfile(varargin) % get two inputs in double
x = str2double(deal(varargin))
% Now use x as an array in the rest of your function.
カテゴリ
ヘルプ センター および File Exchange で Call Java from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!