Cellfun: check cell array for any value below 5, if yes return true
4 ビュー (過去 30 日間)
古いコメントを表示
Hi all, I have the following cell array
A = {4,5,6}
Is there a way to check whether any element is below 5 and return true if yes?
Been searching around but couldn't find any answers.
Cheers
1 件のコメント
採用された回答
Andrei Bobrov
2015 年 5 月 24 日
編集済み: Andrei Bobrov
2015 年 5 月 24 日
any(cellfun(@(x)x < 5,A))
or
any([A{:}] < 5)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!