write statement without using for loop

1 view (last 30 days)
Untitled.png
how to write this statement without using for loop

Accepted Answer

madhan ravi
madhan ravi on 17 Feb 2019
gi=Alpha.*(bi==0)+Beta.*(bi==1)

More Answers (1)

aara
aara on 17 Feb 2019
use if condition?
if bi = 0
gi == alpha;
else
gi == beta;
end

Community Treasure Hunt

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

Start Hunting!