Publishing an M-file with input and uigetfile commands
Show older comments
Hello All,
I am working on a fish tracking algorithm in which I select a data file using the 'uigetfile' command to interactively select the file I want to analyze. After that, there are some 'input' options that the user decides what chunk of data they would like to look at. They are prompted to input a number. I have it set up so that if they do not enter a number, using an if loop with isempty(), that the program uses the default value that I assigned. My problem is trying to publish the file using the 'publish' command. The output format does not really matter, HTML is fine. But, when I publish it, it does not know what file to load or what input values I want so it just outputs the code, but can't evaluate anything. I am hoping someone knows what to do here. I use the discussion board daily and find answers to my questions all the time. I know I am not the first person to do this in Matlab.
Thanks for any help.
~Travis
1 Comment
Walter Roberson
on 8 Dec 2011
There is no such thing as an if loop.
Answers (1)
Sean de Wolski
on 2 Aug 2011
0 votes
I would recommend saving a second copy of the mfile you wish to publish. In this mfile, comment out the input/uigetfile commands (so they still show up but as comments) and just hardwire it to your choice file/inputs.
Categories
Find more on App Building in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!