how to write or condition in if statement matlab?

50 visualizzazioni (ultimi 30 giorni)
if
(j==i) , or (flag(j)==1)

Risposta accettata

Akshay Malav
Akshay Malav il 21 Giu 2019
if (j==i) | (flag(j)==1)
% your code
end

Più risposte (1)

Shwetank Shrey
Shwetank Shrey il 21 Giu 2019
Check out the documentation:
if (j == i) || (flag(j) == 1)
% do something
end
  6 Commenti
madhan ravi
madhan ravi il 21 Giu 2019
What is i here , loop iterator?

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by