MATLAB Answers

How to pass variable from .m file to appdesigner?

17 views (last 30 days)
Dc215905 on 11 Aug 2020
Commented: Dc215905 on 11 Aug 2020
I have a .m file that I am executing on a button press in appdesigner. The final output of that is a structure variable called "data."
How to I pass "data" into appdesigner so that I can then pass that information within the app?
On another note - I'm having a lot of trouble finding basic tutorials on appdesigner. I used GUIDE in the past, but it doesn't seem to translate very well. Any suggestions?

Accepted Answer

Cris LaPierre
Cris LaPierre on 11 Aug 2020
I would suggest turning your m-file into a function that returns data as a function output. Then you can call your function from within app designer, and it will return the value to a variable you specify.
I assume you already know about this tutorial? Once you understand the basics, you might consider looking at some of the examples.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!