Publishing an M-file with input and uigetfile commands

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

Answers (1)

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

Asked:

on 2 Aug 2011

Community Treasure Hunt

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

Start Hunting!