3D matrix generic loop calculation
이전 댓글 표시
Dear sir/ma'am
I have a 3D matrix as
y(:,:1)=h(:,:,1)*x(:,:,1)+h(:,:,2)*x(:,:,2)+h(:,:,3)*x(:,:,3)+h(:,:,4)*x(:,:,4)
y(:,:2)=h(:,:,5)*x(:,:,1)+h(:,:,6)*x(:,:,2)+h(:,:,7)*x(:,:,3)+h(:,:,8)*x(:,:,4)
y(:,:3)=h(:,:,9)*x(:,:,1)+h(:,:,10)*x(:,:,2)+h(:,:,11)*x(:,:,3)+h(:,:,12)*x(:,:,4)
y(:,:1)=h(:,:,13)*x(:,:,1)+h(:,:,14)*x(:,:,2)+h(:,:,15)*x(:,:,3)+h(:,:,16)*x(:,:,4)
But I want to compute generic matlab code as a loop for this implementation such that I can operate any value of h,x,y matrix and reach the same result as above description.
Thank you.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!