Remove Data Outside Range

조회 수: 16 (최근 30일)
Doug
Doug 2018년 10월 10일
댓글: Doug 2018년 10월 10일
I am trying to remove data in both columns based on a data range for the first column. i.e. Col1<4 and Col1>20. And then within the new range determine the max value in Col2 and give me the corresponding value in Col1

채택된 답변

ANKUR KUMAR
ANKUR KUMAR 2018년 10월 10일
AA=temp(temp(:,1)>=4 & temp(:,1)<=20,:);
There is no need to remove. Directly store the numbers which you need.
[xx,yy]=max(AA(:,1));
AA(yy,:)
  댓글 수: 3
ANKUR KUMAR
ANKUR KUMAR 2018년 10월 10일
Use this one,
[xx,yy]=max(AA(:,2));
AA(yy,:)
ans =
13.2813 0.0018
Doug
Doug 2018년 10월 10일
Awesome, thanks for the help.

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by