How to Make m script run faster?
Show older comments
Hi,
I am working on a big model, I have a .m script which adds relative folders path in matlab and imports variables into workspace by calling another .m file.
The problem is it taking a lot of time to complete, more than 80s .
Is it possible to bring it down to 10s.
Accepted Answer
More Answers (1)
You should run the code Profiler to get information on which specific pieces of code take a long time to execute. This way, you can try to improve the performance by tackling the specific functions which take a long time.
A more rudimentary way of profiling your code, is by using the tic toc functions to know how long the code in between the tic/toc took to execute.
1 Comment
Dharaneedharan Arumugam
on 26 Mar 2021
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!