How can I load a txt file and make it display on edit field on MATLAB app designer when I press a button?
Show older comments
How can I load a txt file and make it display on edit field on MATLAB app designer when I press a button? I tried to use mat file and txt file but I am unable to do so.
5 Comments
Mario Malic
on 7 Mar 2021
Show what have you done.
Jorg Woehl
on 7 Mar 2021
A text area is more appropriate for displaying the contents of a textfile, but you could use an edit field as well if you only have a single line of text to display. You would call the code for opening the textfile (given in the link) in the callback function of your button.
Adithya Narasimhan
on 7 Mar 2021
Adithya Narasimhan
on 7 Mar 2021
Edited: Adithya Narasimhan
on 7 Mar 2021
Jorg Woehl
on 7 Mar 2021
The result of date is today's date in the form of a character vector. If, for some reason, this is not sufficient, you can convert it to a string using string(date).
Answers (0)
Categories
Find more on Develop Apps Using App Designer 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!