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 件のコメント

Matt J
Matt J 2022 年 4 月 25 日
編集済み: Matt J 2022 年 4 月 25 日
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.

サインインしてコメントする。

 採用された回答

Prasanna Konyala
Prasanna Konyala 2022 年 4 月 27 日

1 投票

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.

2 件のコメント

CAME18
CAME18 2022 年 4 月 28 日
Sure, a class can be defined on a classic .m file. However, the idea is to document, for example, the methods of such a class with the Live Editor's features. I hope it becomes an option on a future release.
Samantha May
Samantha May 2023 年 3 月 7 日
Hi,
you mentioned:
"you can always define classes in normal ".m" files and then use the classes in live scripts or functions"
How would I go about doing this?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Entering Commands についてさらに検索

製品

リリース

R2022a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by