Scalar Multiplication of different values at same time
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a function -
[x1 x2 x3] = somefunction(y1,y2);
now i want to multiply the [x1 x2 x3] by scalar value z.
[x1 x2 x3] = [x1 x2 x3] .*z; % Want to do like this which is not valid as per the codde
instead of doing the multiplication individually i want to do the multiplication all at a time.
Is there any way to mulitiplication all at a time.
댓글 수: 0
답변 (1개)
madhan ravi
2019년 6월 26일
편집: madhan ravi
2019년 6월 26일
Assign the values with one output for instance as variable X which consists all the values in it.
댓글 수: 6
per isakson
2019년 6월 27일
편집: per isakson
2019년 6월 27일
AFAIK: NO! However, some do weird tricks with subsref and subsasgn.
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!