Live Script to define a class
8 views (last 30 days)
Show older comments
Camilo Andres Manrique Escobar
on 24 Apr 2022
Commented: Camilo Andres Manrique Escobar
on 28 Apr 2022
Ever since I discovered Live Editor Scripts, I use them all the time. It is an excellent feature to correctly document a project. Currently it is not possible to define classes in a Live Editor script. Is this functionality under consideration for a future release?
1 Comment
Matt J
on 25 Apr 2022
It would be nice to be able to define classes even in conventional scripts, or other local scopes like functions. I suspect it would be inefficient though. You would need to reinitialize the class every time that local scope was entered.
Accepted Answer
Prasanna Konyala
on 27 Apr 2022
Hi Camilo
Currently we are not supporting classes in Live Editor. Our developers are aware of this and it might be considered for a future release.
In addition, you can always define classes in normal ".m" files and then use the classes in live scripts or functions.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!