Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Lakyn
Lakyn le 26 Août 2016
Commenté : Lakyn le 26 Août 2016
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!

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 26 Août 2016
Out=B (B>=0.75)
  3 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 26 Août 2016
I don t know what you mean by the entries. You can get the corresponding indices
[x, y]=find (B>=0.75)
Lakyn
Lakyn le 26 Août 2016
thanks mate!

Connectez-vous pour commenter.

Plus de réponses (1)

Andrei Bobrov
Andrei Bobrov le 26 Août 2016
Modifié(e) : Andrei Bobrov le 26 Août 2016
Like said Stephen Cobeldick:
[ii,jj] = find(B > .75);
out = [ii,jj];

Catégories

En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by