multiplying cell array with a matrix
조회 수: 10 (최근 30일)
이전 댓글 표시
i have 2*1 cell array with size 242*234
and matrix of size 242*234
how to apply above code for it.
i am trying with this
Result=cellfun(@(x)x*matrix,Cell,'un',0)
then i get following error
Error in @(x)x*matrix
or if i try with
matrix=matrix.'
then it gives the out put of 242*242.
In my case i need 242*234 matrix.
please help me to solve this.
thanks in advance.
댓글 수: 0
답변 (1개)
Star Strider
2019년 5월 18일
You may want to do element-wise (array) multiplication rather than matrix multiplication.
Try this:
@(x)x.*matrix
Note the (.*) element-wise multiplication operator.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!