Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab- summing of vectors in a matrix

  1. Feb 16, 2012 #1
    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?
     
  2. jcsd
  3. Feb 16, 2012 #2

    kai_sikorski

    User Avatar
    Gold Member

    Say that the matrix is called V

    Code (Text):

    i = [0:149]*4 +1;
    sum(V(:,i)');
     
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Matlab- summing of vectors in a matrix
  1. Vectors in matlab (Replies: 3)

  2. Matrix .* vector? (Replies: 3)

  3. Sum function (MATLAB) (Replies: 1)

Loading...