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

 Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 18 Fév 2012

3 votes

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

3 commentaires

FIR
FIR le 18 Fév 2012
andrei i dont want to use randii
Andrei Bobrov
Andrei Bobrov le 18 Fév 2012
Hi! This is eg!!!! :)
FIR
FIR le 18 Fév 2012
Thanks andrei,can u please answer,i am struck here for some time
http://www.mathworks.in/matlabcentral/answers/29490-error-using-cell2mat

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by