Find cell with nearest value
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Setiadi Suriana
am 23 Mai 2019
Beantwortet: Setiadi Suriana
am 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 Kommentare
Akzeptierte Antwort
madhan ravi
am 23 Mai 2019
C = [yourcell{:}]; % assuming each cell contains a scalar
[Value,Where] = min(C(C>0 & C<1))
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!