multiply scalar with struct regarding

Respuestas (1)

James Tursa
James Tursa el 19 de En. de 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?

Categorías

Etiquetas

Preguntada:

el 19 de En. de 2018

Respondida:

el 19 de En. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by