How to Speed Up MATLAB Code

Explore tips and tricks that show how to speed up MATLAB code. This video shows you ways to measure how long the code takes to run, and it outlines how to identify which parts of the code are slow. Then, based on the type of slow down, it shows best practices like preallocation, vectorization, or parfor (in Parallel Computing Toolbox™) for making the code run faster. Resources: • Measure Performance of Your Program - Documentation: • Profiler - Documentation: • parfor - Documentation: • Deciding When to Use parfor - Documentation: • MATLAB Acceleration: • Performance and Memory - Documentation: Check out the full playlist, which shows how to use MATLAB and Simulink across a range of topics: -------------------------------------------------------------------------------------------------------- Get a free product trial: Learn more about MATLAB: Learn more about Simulink: See What’s new in MATLAB and Simulink: © 2019 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
Back to Top