how to run an already written code?
古いコメントを表示
I am not skilled in using matlab, I am PhD and I asked a code from an author he sent it to me , but I do not know how to run it and to try to find the results in his paper??
7 件のコメント
Guillaume
2014 年 11 月 13 日
Unless documentation has been provided with the code, the best person to tell you how to run it would be the author.
Unless you show us the code, there's not much we can do to help.
Houda
2014 年 11 月 13 日
Adam
2014 年 11 月 13 日
Presumably if you extracted the zip archive to a folder you will have seen the PDF document that it contains giving information about the library of functions.
I would suggest to read that as there is a whole library of stuff in that zip archive and certainly I don't have time to read an understand what it all does just to tell you!
If you open any .m file though you should at least be able to see what the code looks like. I have no idea whether the author documented the .m files in a nice way, provided validation of input arguments or anything else though.
Houda
2014 年 11 月 13 日
Adam
2014 年 11 月 13 日
The unzipped folder of .m files must be on your Matlab path. It can be anywhere on your file system so long as it is on your path though it makes sense to keep all your Matlab files in a small number of locations.
benjamin chan
2020 年 3 月 3 日
編集済み: Walter Roberson
2024 年 10 月 13 日
I am having this problem as well. The following weblink ( http://www.mathworks.com/matlabcentral/fileexchange/41738-vinpfn?focused=3787428&tab=function ) and the file shared does not seem to work. The user manual explicitly states "The VINPFN program is launched by the vinpfn command with no input arrangements." However, when I open the code and run it, I receive error messages that don't make much sense.
Walter Roberson
2024 年 10 月 13 日
That File Exchange contribution requires the inputsdlg File Exchange Contribution.
As well, it needs a repair to inputsdlg: approximately line 1896 needs to be
if ~all(cellfun(@(v)isscalar(v)&&(islogical(v)||isnumeric(v)),vals))
just before
err = {'inputsdlg:InvalidInput','Default logical data must be of logical or numeric scalar.'};
採用された回答
その他の回答 (1 件)
Siam
2014 年 11 月 13 日
1 投票
You do not have to unzip and save that to MATLAB folder. Unzip the file where you want to unzip. Can be anywhere in your computer. After extraction open the folder and click on your .m file. MATLAB will open automatically. Hit run and it will execute unless there is an error with the code.
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
