Matrix Logical Indexing in If...else... construction
2 ビュー (過去 30 日間)
古いコメントを表示
Pavel M
2019 年 12 月 15 日
回答済み: Thiago Henrique Gomes Lobato
2019 年 12 月 15 日
How i can do condition then if in my array varargin{j} at least one logical '1' is exist, condition works?
example
elseif varargin{j} == inf | varargin{j} == 0 | varargin{j} < 0
error(..)
0 件のコメント
採用された回答
Thiago Henrique Gomes Lobato
2019 年 12 月 15 日
If you wanna check that a condition happens at least one time in an array you can use "any"
elseif any(isinf(varargin{j})) || any(varargin{j} <= 0)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!