Filter löschen
Filter löschen

selection of particular rows from a matrix?

2 Ansichten (letzte 30 Tage)
minu s
minu s am 23 Okt. 2016
Kommentiert: michio am 24 Okt. 2016
I would like to select rows from a matrix in a particular pattern as: row nos 1,2,3,5,6,7,9,10,11,13 and so on. Please help me in coding the loop.

Antworten (1)

michio
michio am 23 Okt. 2016
Bearbeitet: michio am 23 Okt. 2016
ismember function could do the work with 'rows' option.
Please check the example code with 'rows' option on the doc page.
  1 Kommentar
michio
michio am 24 Okt. 2016
Very simple sample code follows.
A = [1,2,3; 2,3,1; 3,1,2];
B = [2,3,1];
idx = ismember(A,B,'rows')
A(idx,:)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by