the if statement with and/or

3 ビュー (過去 30 日間)
moji
moji 2014 年 6 月 17 日
編集済み: Azzi Abdelmalek 2014 年 6 月 17 日
Is this right?
If a and b and c and d <= 100 {statement} end
  2 件のコメント
Chad Greene
Chad Greene 2014 年 6 月 17 日
Your question is not very clear. What do your data look like and what is your goal?
Geoff Hayes
Geoff Hayes 2014 年 6 月 17 日
No, that statement is incorrect. In the Command Window, type help if or doc if for details on constructing an if statement and how relational operators are used in compound expressions.

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 6 月 17 日
編集済み: Azzi Abdelmalek 2014 年 6 月 17 日
if a<100&b<100&c<100&d<100
%do
end
%or
if all([a b c d]<100)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by