jaobyccdee
- 33
- 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?
The discussion focuses on summing specific columns of an 8000x600 matrix in MATLAB. The user aims to sum columns indexed by the formula (4*i+1) for i ranging from 0 to 149. The solution provided utilizes MATLAB's indexing capabilities, specifically creating an index vector 'i' and applying it to the matrix 'V' to compute the sum using the command 'sum(V(:,i)')'. This method efficiently aggregates the desired columns in a single operation.
PREREQUISITESMathematics students, data analysts, and engineers who utilize MATLAB for matrix computations and require efficient methods for summing specific columns in large datasets.
i = [0:149]*4 +1;
sum(V(:,i)');