How can I reduce the run time a code?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1574762/image.jpeg)
0 Kommentare
Antworten (2)
madhan ravi
am 22 Dez. 2023
Verschoben: Matt J
am 22 Dez. 2023
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 Kommentare
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps 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!