How to Speed Up MATLAB Code

preview_player
Показать описание
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:

--------------------------------------------------------------------------------------------------------

© 2019 The MathWorks, Inc. MATLAB and Simulink are registered
trademarks of The MathWorks, Inc.
Рекомендации по теме
Комментарии
Автор

1 min watch time saves me 6hours, great thanks

brucelau
Автор

thank you!
one irrelevant question: what software did you use for recording the screen and how did you implement zoom-ins and zoom-outs in it?

alirasoulzadeh
Автор

Best Video sir
understood my mistakes

sukshithshetty
Автор

Thanks for video, Can ı ask you one question , How do I perform prelocation when creating an array using a for loop?

for example
Vcruise=[];
HPreq=[];
speedvalue=160 (maybe much more big values for other operations) ;


for i=1:1:speedvalue

Vcruise=[Vcruise, i];

Ptotal_fwd=....
....
HPreq=[HPreq, PTotal_fwd];
end

and some graphical operations

kuzgun_TR
Автор

Is there a memory profiler for MATLAB? (for non Windows OS) In R2020a the profiler is really cool.

CityJumpr
Автор

Fix the subtitles, where he says "500" the subtitles report "100" and "120". There's a nonsense part where it is written "Now using tic toc, we see that our code is faster now taking around 250 seconds to run as opposed to 120 before"

Robotg
Автор

Hello sir please guide me. In my matlab code show orange error please guide how can I remove this error.

nadiarehman
welcome to shbcf.ru