How to make a button in AppDesigner launch a matlab script ?

Hello!
I am trying make a button in app designer that will launch a matlab script that I wrote before. I have already created a button, but I don't know how to code this in my ButtonPushed button..
Thanks for helping !

 Respuesta aceptada

Mario Malic
Mario Malic el 8 de Mzo. de 2021
Hello,
See run function.

7 comentarios

Thank you, it helps a lot!
However, the data that I calculate do not appear in the workspace (I'd like to import these data in app designer after the calculations). do you have any tips for that?
You can:
  • save your workspace (or variables only) and use load function within App Designer
  • convert your script to function that outputs the needed results
Thank you again! I'll try that..
I wanted to try to run the matlab script outside appdesigner, because I feared that it would be very long if I put the script in a function (the app is very very slow on my computer).
I think the timing will be very similar regardless whether the file is a function or a script. App is very slow? What does your app do? Only slowness that might be caused is related to plotting the functions many many times.
It displays images like a movie, so I'm sure that the slowness comes from here. But if the timing is similar, I'll put all the script in a function!
You can try external figure window, as opposed to uifigure (the one that AppDesigner uses). Having two different elements is not so nice estetically, but if you care about performance, then it's fine.
ok thank you so much !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.

Preguntada:

el 8 de Mzo. de 2021

Comentada:

el 9 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by