write statement without using for loop

1 visualizzazione (ultimi 30 giorni)
Untitled.png
how to write this statement without using for loop

Risposta accettata

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

Più risposte (1)

aara
aara il 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!

Translated by