multiply scalar with struct regarding
이전 댓글 표시
is possible to multiply a scalar value with struct field?if possible plz help me?
답변 (1개)
James Tursa
2018년 1월 19일
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 Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!