フィルターのクリア

expression that changes if a condition is true

3 ビュー (過去 30 日間)
Valeria Leto
Valeria Leto 2020 年 5 月 15 日
コメント済み: Ameer Hamza 2020 年 5 月 15 日
Hi! I know it's a silly question but I don't remember how to write an expression like that
theta=psi+pi*(condition:x<0)
and I want -theta=psi if the condition is false
-theta=psi+pi if the condition is true
thanks!

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 15 日
This is the correct syntax
theta = psi+pi*(x<0)
  2 件のコメント
Valeria Leto
Valeria Leto 2020 年 5 月 15 日
thanks
Ameer Hamza
Ameer Hamza 2020 年 5 月 15 日
I am glad to be of help!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by