MATLAB: Write statement without using for loop

bilevel signal

Untitled.png
how to write this statement without using for loop

Best Answer

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