Find cell with nearest value

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 youVal.JPG

 采纳的回答

C = [yourcell{:}]; % assuming each cell contains a scalar
[Value,Where] = min(C(C>0 & C<1))

更多回答(1 个)

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

产品

版本

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by