How to use .m files from complex matlab program in app designer code
Mostra commenti meno recenti
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.
Risposte (1)
Arthur Roué
il 23 Lug 2020
Modificato: Arthur Roué
il 23 Lug 2020
0 voti
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 Commenti
Piotr Cis
il 23 Lug 2020
Arthur Roué
il 23 Lug 2020
Never tried to add sub-folders in a class folder, I'm not sure it is supported by Matlab, can you try and tell me if it went well ?
You can however create a subfolder private where all functions in it will be private methods.
Piotr Cis
il 23 Lug 2020
Arthur Roué
il 24 Lug 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)
Categorie
Scopri di più su Develop Apps Using App Designer in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
