Matrix Logical Indexing in If...else... construction
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pavel M
am 15 Dez. 2019
Beantwortet: Thiago Henrique Gomes Lobato
am 15 Dez. 2019
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 Kommentare
Akzeptierte Antwort
Thiago Henrique Gomes Lobato
am 15 Dez. 2019
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays 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!