3D matrix generic loop calculation
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!