write statement without using for loop

 採用された回答

madhan ravi
madhan ravi 2019 年 2 月 17 日

1 投票

gi=Alpha.*(bi==0)+Beta.*(bi==1)

その他の回答 (1 件)

aara
aara 2019 年 2 月 17 日

0 投票

use if condition?
if bi = 0
gi == alpha;
else
gi == beta;
end

カテゴリ

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

質問済み:

2019 年 2 月 17 日

回答済み:

2019 年 2 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by