multiply scalar with struct regarding
Ältere Kommentare anzeigen
is possible to multiply a scalar value with struct field?if possible plz help me?
Antworten (1)
James Tursa
am 19 Jan. 2018
Well, just this:
s.f = rand(3); % a matrix in a struct field
x = rand; % a scalar
result = x * s.f; % multiply a scalar with a struct field
Was there something else to your problem that is more involved than this?
Kategorien
Mehr zu Structures finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!