How do I get specific rows from a matrices where a<= x<= b

1 回表示 (過去 30 日間)
Isaac Hassen
Isaac Hassen 2020 年 7 月 7 日
コメント済み: Isaac Hassen 2020 年 7 月 7 日
Hello,
I have a matrix "data1" of 3 colums and 1253 rows. Let say the colums are (x,y,z), I want to get a matrix when 75 <= y <= 150 and x <= 10.
y=data1(:,2);
l=data1(75<y<150,1:3);
This doesn't work.

採用された回答

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2020 年 7 月 7 日
編集済み: JESUS DAVID ARIZA ROYETH 2020 年 7 月 7 日
newmatrix=data1(and(and(data1(:,1)<=10,data1(:,2)<=150),data1(:,2)>=75),:)
  1 件のコメント
Isaac Hassen
Isaac Hassen 2020 年 7 月 7 日
Thank you very much sir!! I really appreciate it.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by