summation inside for loop
2 views (last 30 days)
Show older comments
Edited: Mert Demir on 23 Feb 2022
Have a good day. I am trying to find an easy way of writing a loop below:
for iznext=1 expv(:,iz)=v(:,iz)*Q_z(iz,iznext)+v(:,iz)*Q_z(iz,iznext+1)+v(:,iz)*Q_z(iz,iznext+2);
Thanks in advance.
Torsten on 21 Jul 2021
vec = ones(1,5)*Q_z.' ;
exp2(1:100,:) = vec ;
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!