Open a file according to text box value.

1 Ansicht (letzte 30 Tage)
Sam Upeshala
Sam Upeshala am 12 Dez. 2018
Kommentiert: Sam Upeshala am 12 Dez. 2018
In my matlab application I have a text box and a push button. when I enter "1" in the text box and click puch button, I want to open a one file and, when I enter "2" in the text box and click push button, I want to open another file. How can I do this?

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 12 Dez. 2018
Why don't you make the push button to call [filename, pathname]=uigetfile() to select the file? Then you can use the text box to display the filename.
  1 Kommentar
Sam Upeshala
Sam Upeshala am 12 Dez. 2018
I want to open both files using one push button and, also I want to open one file at once.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Import and Export finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by