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
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
Houda 2014년 11월 13일
the author sent to me an zipped file, I extract the file on a folder but didn't know how to call it on matlab for execution?
Adam
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
Houda 2014년 11월 13일
But in a first step should I put the folder under the Matlab on C: than go to current folder and choose the location of the folder then open the .m files? or I can keep the folder on any location not necessary under the matlab??
Adam
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
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.
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.'};

댓글을 달려면 로그인하십시오.

 채택된 답변

MA
MA 2014년 11월 13일

0 개 추천

open your matlab program then click on open file icon on the top of program, it open new window for you then choose yor m-file from unzip td, in the new window click run icon that show with the green play picture on top of window and see your result

댓글 수: 7

Houda
Houda 2014년 11월 13일
I done exactly what you tell me, but there are error message telling that input argument is not defined!!!! but it is not me how write this code so haw can I fix this error!!!!
MA
MA 2014년 11월 13일
you can keep it in any folder you like it is not important
MA
MA 2014년 11월 13일
i have know idea that what your code is
MA
MA 2014년 11월 13일
If it gives you an error after you run it, the program must be reclaim
Adam
Adam 2014년 11월 13일
편집: Adam 2014년 11월 13일
Generally you cannot simply open an m file and run it unless it is a script or a function that works with no input arguments.
This is a whole library of functionality so most of it is unlikely to run with no arguments so you need to read the documentation as I said above.
Also don't be too hasty to accept an answer if you are then going to add comments that it actually doesn't solve your problem as many people will by-pass this thread now that it has an accepted answer. unfortunately there is also no way to un-accept an answer.
Houda
Houda 2014년 11월 13일
It is a code about disaggregation, I want to use the commonly used method to disaggregate Tunisian data. Yes I think that I must read under scrutiny the written code and find the error source. Thanks for the help Adam, M.A and Guillaume (this my e-mail: boubakerhouda@gmail.com)
MA
MA 2014년 11월 13일
Temporal disaggregation using low-pass filtering

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Siam
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.

댓글 수: 2

Houda
Houda 2014년 11월 13일
thanks Siam, really I worried the question about the folder location. is there a simple documents other the user guides or websites to understand programming on matlab??
Siam
Siam 2014년 11월 13일
you can use > help < in your MATLAB command window as well.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

2014년 11월 13일

댓글:

2024년 10월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by