Trouble using strings in If statements using OR

 採用された回答

Voss
Voss 2022 年 1 月 20 日

1 投票

if race == "H2" || race == "H1" || race == "H3" || race == "H4"

1 件のコメント

Walter Roberson
Walter Roberson 2022 年 1 月 20 日
Or alternately
if ismember(race, ["H1", "H2", "H3", "H4"])

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

製品

質問済み:

2022 年 1 月 20 日

コメント済み:

2022 年 1 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by