Find cell with nearest value

1 回表示 (過去 30 日間)
Setiadi Suriana
Setiadi Suriana 2019 年 5 月 23 日
回答済み: Setiadi Suriana 2019 年 5 月 23 日
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

採用された回答

madhan ravi
madhan ravi 2019 年 5 月 23 日
C = [yourcell{:}]; % assuming each cell contains a scalar
[Value,Where] = min(C(C>0 & C<1))

その他の回答 (1 件)

Setiadi Suriana
Setiadi Suriana 2019 年 5 月 23 日
It is solved. Thank you

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by