How to assign array values to object.object.property at once using deal?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abdolkarim Mohammadi
am 13 Sep. 2020
Bearbeitet: Matt J
am 13 Sep. 2020
I know that it is possible to assign the values of an array to object.property using deal(). Is it possible to do such thing for object.object.property? I am specifically working with SimulationInput objects, where the variables property of this object is itself an object and has a property named value, and I want to do something like the following:
SimIn = repmat (Simulink.SimulationInput, [NumRows, NumCols]);
[SimIn] = SimIn.setVariable ('VariableName', 0);
SimIn.Variables.Value = Data(:);
or
[SimIn(:).Variables.Value] = deal (Data(:));
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Variables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!