I'm making a ui in which the push button opens a dialog box, from which I will select a file, after which the file path will be placed on a text box. I don't know how to do the latter part.

3 views (last 30 days)
I am working with a simulation whose code I have yet to fully understand. Right now there's this textbox in the ui on which you write the file path of the file you want to use for this simulation. This is a bit annoying and so I want to instead push a button which will open up a dialog box from which I can select the file to be opened by the simulation. Once I have selected this file, I wish for the file path to be placed/written in the text box.
I have successfully placed the push button and when pushed I can select a file, however when I open it nothing happens to the textbox, it stays blank. Instead I get an output on the command window stating filename =
nanocal.txt
where nanocal.txt is the file I want the simulation to use. What am I supposed to look for to add this other layer of functionality to my ui?

Answers (0)

Categories

Find more on Migrate GUIDE Apps 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!