Input array in if else statement

Hi.. actually i want to design energy controller that using if else stetment but in continuosly way.. using input array..but i dont know where to start about can somebody help me?

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 12 月 5 日

1 投票

You probably want to learn about logical indexing. For example,
mask = U1 < 17.82;
U2(mask)= U1(mask) * 3.8;
U2(~mask) = U1(~mask) - 1.29;

カテゴリ

ヘルプ センター および File ExchangeMATLAB Parallel Server についてさらに検索

質問済み:

2016 年 12 月 5 日

回答済み:

2016 年 12 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by