operation array in cell
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
i have a problem. i have a cell A. cell A have 13*13 blocks (A{1,1},A{1,2},..., A{13,13})and every blocks have 8*8 pixels. i have matrix p 169*1 and matrix q 169*1.
i want to process them to find value A' = A*p + q.
example, A'{1,1} = (A{1,1}*p(1,1))+q(1,1).
next A'{1,2} = (A{1,2}*p(1,2))+q(1,2) and finally until A'{13,13}
댓글 수: 3
Walter Roberson
2013년 3월 4일
You cannot do that. p and q are 169*1 so p(1,2) and q(1,2) are indexing out of range since the largest defined second index for p and q is 1.
Internazionale
2013년 3월 4일
Internazionale
2013년 3월 4일
답변 (1개)
Andrei Bobrov
2013년 3월 4일
편집: Andrei Bobrov
2013년 3월 4일
out = A';
for jj = 1:numel(out)
out{jj} = out{jj}*p(jj)+q(jj);
end
out = out';
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!