필터 지우기
필터 지우기

Extracting data from a matrix for a particular threshold

조회 수: 2 (최근 30일)
Akash Pandya
Akash Pandya 2019년 2월 27일
댓글: KSSV 2019년 2월 27일
Hi,
I have a data matrix (442 x 442) which represents pairwise correlations (Cij). I have values from -1 to 1 and I would like to identify the rows and columns with values greater than 0.6 and also less than -0.6. I've tried a few solutions but I'm not having any luck.
Any form of guidance will be much appreciated.
Thank you,
Akash

답변 (1개)

KSSV
KSSV 2019년 2월 27일
편집: KSSV 2019년 2월 27일
Read about find
idx = A>0.6 | A<-0.6 ;
  댓글 수: 2
Akash Pandya
Akash Pandya 2019년 2월 27일
Hi,
Thank you for your answer. When I ran the code, it returned binary values 1 or 0, which is expected. If I wanted then print the row and column number, how would I do that? For example, row 2, column 9
I read about find , but I'm still not clear on how to do the above.
Akash
KSSV
KSSV 2019년 2월 27일
you can extract the respective values using A(idx) . if you want indices use find(idx). They are logicals.

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

카테고리

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

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by