Is it possible to save an object to a structure field?

3 ビュー (過去 30 日間)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2020 年 4 月 27 日
編集済み: Ameer Hamza 2020 年 4 月 27 日
I am interested to put an object into a structure field like:
struct.field=object;
is it possible?
  1 件のコメント
Rik
Rik 2020 年 4 月 27 日
Why wouldn't it be? And why didn't you just try it?

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

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 27 日
編集済み: Ameer Hamza 2020 年 4 月 27 日
Definitely possible
>> fig = figure;
>> myStruct.a = fig
myStruct =
struct with fields:
a: [1×1 Figure]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by