Find cell with nearest value
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Setiadi Suriana
il 23 Mag 2019
Risposto: Setiadi Suriana
il 23 Mag 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 Commenti
Risposta accettata
madhan ravi
il 23 Mag 2019
C = [yourcell{:}]; % assuming each cell contains a scalar
[Value,Where] = min(C(C>0 & C<1))
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!