- #1
Beer-monster
- 296
- 0
Hi all
1. Homework Statement
I have a function script for doing some analysis of data from a text file and making some plots. My script takes the filename as an input argument - this is very helpful for running the analysis over multiple files and replicating results.
However, I have also found it helpful to be able to browse for the file using the command uigetfile.
So I have two versions of the same analysis script: one that requires a filename and one that opens a dialog box. This quite inefficient and awkward and it would be great if I could use a single script.
The ideal solution would be to have the code branch so that if a filename is provided that file is opened as normal, else a dialog box would appear if no name was provided (i.e. an empty argument.)
I've googled around and searched mathworks, but have not found anything that helpful. Would anyone be able to point me in the direction of a solution?
Thanks for your help.BM
1. Homework Statement
I have a function script for doing some analysis of data from a text file and making some plots. My script takes the filename as an input argument - this is very helpful for running the analysis over multiple files and replicating results.
However, I have also found it helpful to be able to browse for the file using the command uigetfile.
So I have two versions of the same analysis script: one that requires a filename and one that opens a dialog box. This quite inefficient and awkward and it would be great if I could use a single script.
The ideal solution would be to have the code branch so that if a filename is provided that file is opened as normal, else a dialog box would appear if no name was provided (i.e. an empty argument.)
The Attempt at a Solution
I've googled around and searched mathworks, but have not found anything that helpful. Would anyone be able to point me in the direction of a solution?
Thanks for your help.BM