Numbers between a Matrix

조회 수: 1 (최근 30일)
Nicolas Sajche
Nicolas Sajche 2021년 9월 3일
댓글: John D'Errico 2021년 9월 3일
Lets suppose I have a time vs Volts Matrix(10*2).
a=rand(10,2)*2
a =
0.8775 0.5521
0.7631 1.3594
1.5310 1.3102
1.5904 0.3252
0.3737 0.2380
0.9795 0.9967
0.8912 1.9195
1.2926 0.6808
1.4187 1.1705
1.5094 0.4476
How do I found the numbers of that Matrix that are in between [0(left colum) and 1.5(rigth colum)].
  댓글 수: 1
John D'Errico
John D'Errico 2021년 9월 3일
Please don't ask this again. You have now gotten answers on both of your questions, so I will not close it as a duplicate. But I will do so if you ask the same question again.

댓글을 달려면 로그인하십시오.

답변 (1개)

Malik Cheriaf
Malik Cheriaf 2021년 9월 3일
% numbers between "left column">=0 and "rigth column"<=1.5.
i=(a(:,1)>=0 & a(:,2)=<1.5)
a=a(i,:);

카테고리

Help CenterFile Exchange에서 Agriculture에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by