how to write or condition in if statement matlab?

64 ビュー (過去 30 日間)
Sultan Mehmood
Sultan Mehmood 2019 年 6 月 21 日
コメント済み: Sultan Mehmood 2019 年 6 月 21 日
if
(j==i) , or (flag(j)==1)

採用された回答

Akshay Malav
Akshay Malav 2019 年 6 月 21 日
if (j==i) | (flag(j)==1)
% your code
end

その他の回答 (1 件)

Shwetank Shrey
Shwetank Shrey 2019 年 6 月 21 日
Check out the documentation:
if (j == i) || (flag(j) == 1)
% do something
end
  6 件のコメント
madhan ravi
madhan ravi 2019 年 6 月 21 日
What is i here , loop iterator?
Sultan Mehmood
Sultan Mehmood 2019 年 6 月 21 日
yes
i=1:65536;
L=65536;

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by