Improving an if else function
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
AKARSH KUMAR
2020 年 6 月 24 日
I don't think this if else condition could further be reduced, try to check in your other part of code.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!