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에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!