Find cell with nearest value
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Setiadi Suriana
le 23 Mai 2019
Réponse apportée : Setiadi Suriana
le 23 Mai 2019
I have cell array 1x406 which each cell has a value. And I want to find a cell with the value nearest to 0. In this case i want output is 175. Thank you
0 commentaires
Réponse acceptée
madhan ravi
le 23 Mai 2019
C = [yourcell{:}]; % assuming each cell contains a scalar
[Value,Where] = min(C(C>0 & C<1))
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Multidimensional Arrays 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!