How to use .m files from complex matlab program in app designer code

3 vues (au cours des 30 derniers jours)
Piotr Cis
Piotr Cis le 23 Juil 2020
Commenté : Arthur Roué le 24 Juil 2020
I'm trying to design a interface for expanded MatLab program in app designer. I'm wondering how to use several .m files in app designer code view.

Réponses (1)

Arthur Roué
Arthur Roué le 23 Juil 2020
Modifié(e) : Arthur Roué le 23 Juil 2020
You can't do this directly in appdesigner interface. A workaround is to create a class folder (@MyClass) and put you *.mlapp and separate function in M-File in it.
Here is an example :
All M-Files are methods of my class VIDEOO.
  4 commentaires
Piotr Cis
Piotr Cis le 23 Juil 2020
The problem is that the main program has defined myclass @engineSim, if i define new class (for app designer), the whole program doesn't work. Unfortunetly i don't have much experience with matlab.
Arthur Roué
Arthur Roué le 24 Juil 2020
Ok, now I'm not so sure of what you want to do. Does the entry point of your soft is the constructor of your class engineSim ? When do you call your *.mlapp file ?
If by "use several .m files in app designer code view" you mean define function in separate M-File, you can just create a function in a M-File and call it in any callback of your app (code view)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by