write statement without using for loop

1 回表示 (過去 30 日間)
Elysi Cochin
Elysi Cochin 2019 年 2 月 17 日
回答済み: madhan ravi 2019 年 2 月 17 日
Untitled.png
how to write this statement without using for loop

採用された回答

madhan ravi
madhan ravi 2019 年 2 月 17 日
gi=Alpha.*(bi==0)+Beta.*(bi==1)

その他の回答 (1 件)

aara
aara 2019 年 2 月 17 日
use if condition?
if bi = 0
gi == alpha;
else
gi == beta;
end

カテゴリ

Help Center および File ExchangeDebugging and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by