how to write or condition in if statement matlab?

55 vues (au cours des 30 derniers jours)
Sultan Mehmood
Sultan Mehmood le 21 Juin 2019
Commenté : Sultan Mehmood le 21 Juin 2019
if
(j==i) , or (flag(j)==1)

Réponse acceptée

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

Plus de réponses (1)

Shwetank Shrey
Shwetank Shrey le 21 Juin 2019
Check out the documentation:
if (j == i) || (flag(j) == 1)
% do something
end
  6 commentaires
madhan ravi
madhan ravi le 21 Juin 2019
What is i here , loop iterator?
Sultan Mehmood
Sultan Mehmood le 21 Juin 2019
yes
i=1:65536;
L=65536;

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Export to MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by