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!