Matlab- summing of vectors in a matrix

  • Context: MATLAB 
  • Thread starter Thread starter jaobyccdee
  • Start date Start date
  • Tags Tags
    Matlab Matrix Vectors
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
jaobyccdee
Messages
33
Reaction score
0
I have a 8000x600 Matrix called V. How can i add the colume 1,5,9,13,17... (all colume of (4*i+1) for i from 0 to 149) of the vector?
 
Physics news on Phys.org
Say that the matrix is called V

Code:
i = [0:149]*4 +1;
sum(V(:,i)');