フィルターのクリア

selection of particular rows from a matrix?

2 ビュー (過去 30 日間)
minu s
minu s 2016 年 10 月 23 日
コメント済み: michio 2016 年 10 月 24 日
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.

回答 (1 件)

michio
michio 2016 年 10 月 23 日
編集済み: michio 2016 年 10 月 23 日
ismember function could do the work with 'rows' option.
Please check the example code with 'rows' option on the doc page.
  1 件のコメント
michio
michio 2016 年 10 月 24 日
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,:)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by