필터 지우기
필터 지우기

Elementwise product ef elements of a vector times a matrix

조회 수: 4 (최근 30일)
Ana
Ana 2011년 12월 15일
Hello,
I have a 2x2 matrix, imagine:
A=[1 2;3 5];
And a vector, for example of dimension 6:
b=1:6;
I need to construct a matrix 2x(6x2)=2x12, in which I have 6 2x2 matrices obtained as the product of matrix A times the corresponding element of vector b.
Is there any direct way of doing this without a loop and avoiding repeating the elements (i.e. constructing two 2x12 matrices and multiply them elementwise)?
Thanks in advance,
Ana

채택된 답변

Andrei Bobrov
Andrei Bobrov 2011년 12월 15일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by