Improving an if else function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello Board,
Anyone on ideas on a more efficient solution than the if else function below?? This takes the bulk of the time for the code so I need to reduce it.
function result = vre(t,r,e.......)
if (t==4 && r>0)
result = 0;
elseif (e==4 && r==0)
result = 1;
.
.
.
end
end
Thanks
2 Kommentare
Antworten (1)
AKARSH KUMAR
am 24 Jun. 2020
I don't think this if else condition could further be reduced, try to check in your other part of code.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks 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!