Use data calculated in a matlab programm in gui

3 views (last 30 days)
Faredin Thaqi
Faredin Thaqi on 29 Apr 2022
Answered: Kevin Holly on 2 May 2022
I am working on a programm that calculates several variables. At the end I want it to open the Interface that i created with the app designer and i want it to show the values of calculated variables. Can you guys tell me how i can use the data from the main programm to print it to the gui text field for example?

Answers (1)

Kevin Holly
Kevin Holly on 2 May 2022
Is this program written in script/function MATLAB files? You can call these scripts/function within App Designer or you could write them within App Designer through startup or callback functions in code view.
To change the text of the label you can write:
app.Label.Text = "Hello world"
if you have numeric data
app.Label.Text = num2str(variable)
Here is a nice intro to App Designer.

Community Treasure Hunt

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

Start Hunting!