Effacer les filtres
Effacer les filtres

Find function in matlab

2 vues (au cours des 30 derniers jours)
kay Dee
kay Dee le 24 Fév 2020
Commenté : kay Dee le 25 Fév 2020
Hello i am trying to understand how to use this find function in matlab but i don't understand welll how it works , can anybody please explain to me where these answers are coming from ??
a =
11 5 9
15 1 6
17 12 21
>> [raws,coloms]=find(a>10)
raws =
1
2
3
3
3
coloms =
1
1
1
2
3

Réponse acceptée

Stephen23
Stephen23 le 24 Fév 2020
Modifié(e) : Stephen23 le 24 Fév 2020
find returns the indices of non-zero elements of an array. You provided find with a logical array with these values:
>> a>10
ans =
1 0 0
1 0 0
1 1 1
That means the row and column indices are for those non-zero (i.e. true) values:
  1 commentaire
kay Dee
kay Dee le 25 Fév 2020
Aaaah Thank you very much! i had just spent like 2 hours just trying to find out what it is . Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical 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