write statement without using for loop

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Debugging and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by