# Answer to Question #5767 in MatLAB | Mathematica | MathCAD | Maple for Anu

Question #5767

I have a mat file (matrix)with 36000X7 dim in Matlab and I want to delete every 2nd row from the matrix that would result in 18000X7 dim matrix. How to do that using Matlab?

Expert's answer

Let A be the matrix with 36000X7 dim.

Then the command

A(1:2:end,:)

shows all rows starting from 1 to the last row with

step 2, that is rows

1,3,5,7...

Then the command

A(1:2:end,:)

shows all rows starting from 1 to the last row with

step 2, that is rows

1,3,5,7...

## Comments

## Leave a comment