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

1 view (last 30 days)
I am interested to put an object into a structure field like:
struct.field=object;
is it possible?

Accepted Answer

Ameer Hamza
Ameer Hamza on 27 Apr 2020
Edited: Ameer Hamza on 27 Apr 2020
Definitely possible
>> fig = figure;
>> myStruct.a = fig
myStruct =
struct with fields:
a: [1×1 Figure]

More Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!