write statement without using for loop

1 Ansicht (letzte 30 Tage)
Elysi Cochin
Elysi Cochin am 17 Feb. 2019
Beantwortet: madhan ravi am 17 Feb. 2019
Untitled.png
how to write this statement without using for loop

Akzeptierte Antwort

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

Weitere Antworten (1)

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

Kategorien

Mehr zu Debugging and Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by