multiply scalar with struct regarding

is possible to multiply a scalar value with struct field?if possible plz help me?

回答 (1 件)

James Tursa
James Tursa 2018 年 1 月 19 日

1 投票

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?

カテゴリ

ヘルプ センター および File ExchangeStructures についてさらに検索

タグ

質問済み:

2018 年 1 月 19 日

回答済み:

2018 年 1 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by