How can I reduce the run time a code?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everybody,
I ran a code and controlled the run time of each script.
As you can see in Figure attachment, I realized that find command increase the run time.
How can I reduce this time?
댓글 수: 0
답변 (2개)
madhan ravi
2023년 12월 22일
이동: Matt J
2023년 12월 22일
Directly use logical indexing , i.e: remove find(…) command and replace your if condition with
if any(index)
Try using ismember(…) instead of == , not sure which one is faster.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!