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!