MATLAB: Do the Live Editor, Command Window, and Simulink get slow after several runs of a Live Script livescriptMATLABperformance Best Answer This issue is likely due to MATLAB not having sufficient memory available to perform the calculations repeatedly.You can increase the size of the Java Heap for MATLAB. The documentation for "Java Heap Memory Preferences" is here:https://www.mathworks.com/help/releases/R2020a/matlab/matlab_external/java-heap-memory-preferences.htmlYou can also try removing 'clear' or 'close' commands in the Live Script, as these impact performance as well. For example, these functions:>> clear all >> close all may cause performance issues if called repeatedly. Related SolutionsMATLAB: Is Matlab slow on brand new laptop This issue is likely due to MATLAB being run with compatibility mode for Windows 8. Removing the compatibility mode resolves this issue. Please refer the online resource to run a program with/without compatibility mode:https://www.online-tech-tips.com/windows-8/run-a-program-in-compatibility-mode-in-windows-8/ MATLAB: Line number in Live Editor Thomas, to display line numbers in the Live Editor, open a live script, go to the VIEW tab on the very top and select Line Numbers. Related QuestionJava Heap Space Memory Matlab2009b WindowsLive Script versus Jupyter Notebook
Best Answer
This issue is likely due to MATLAB not having sufficient memory available to perform the calculations repeatedly.
You can increase the size of the Java Heap for MATLAB. The documentation for "Java Heap Memory Preferences" is here:
https://www.mathworks.com/help/releases/R2020a/matlab/matlab_external/java-heap-memory-preferences.html
You can also try removing 'clear' or 'close' commands in the Live Script, as these impact performance as well. For example, these functions:
may cause performance issues if called repeatedly.