Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

selecting even rows

Asked by FIR

FIR

on 18 Feb 2012
Latest activity Edited by Cedric Wannaz

Cedric Wannaz

on 15 Oct 2013
Accepted Answer by Andrei Bobrov

Andrei Bobrov

I have a matrix of 14x6,in this matrix i want to select only even rows and display,please help

0 Comments

FIR

FIR

Tags

Products

No products are associated with this question.

1 Answer

Answer by Andrei Bobrov

Andrei Bobrov

on 18 Feb 2012
Accepted answer

A - your matrix

A = randi(23,14,6)
out = A(2:2:end,:)

3 Comments

FIR

FIR

on 18 Feb 2012

andrei i dont want to use randii

Andrei Bobrov

Andrei Bobrov

on 18 Feb 2012

Hi! This is eg!!!! :)

FIR

FIR

on 18 Feb 2012

Thanks andrei,can u please answer,i am struck here for some time

http://www.mathworks.in/matlabcentral/answers/29490-error-using-cell2mat

Andrei Bobrov

Andrei Bobrov

Contact us