How can I load a txt file and make it display on edit field on MATLAB app designer when I press a button?

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

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.
I have a small doubt How do I conever d = date('today') to a string?
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).

Sign in to comment.

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Release

R2020b

Asked:

on 7 Mar 2021

Commented:

on 7 Mar 2021

Community Treasure Hunt

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

Start Hunting!