필터 지우기
필터 지우기

How do I find list down values in a matrix that is larger than 0.75?

조회 수: 1 (최근 30일)
Lakyn
Lakyn 2016년 8월 26일
댓글: Lakyn 2016년 8월 26일
Hi! So I want to list down the entries that the data in my matrix is larger or equal to a particular value, say 0.75.
I only want the upper triangle too, so I have already did B = triu(A,1) to my data, and I know that I can just do B >= 0.75. The problem is that I only know where the values are above 0.75, but not like a list of their entry, e.g. (1,2), (4,7)...
Is there a way for me to add something to do that? Thanks!

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 26일
Out=B (B>=0.75)
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 26일
I don t know what you mean by the entries. You can get the corresponding indices
[x, y]=find (B>=0.75)

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

추가 답변 (1개)

Andrei Bobrov
Andrei Bobrov 2016년 8월 26일
편집: Andrei Bobrov 2016년 8월 26일
Like said Stephen Cobeldick:
[ii,jj] = find(B > .75);
out = [ii,jj];

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by