Error: File is too large for MATLAB to run.

21 visualizzazioni (ultimi 30 giorni)
Hi all,
After opening a large .m file (140MB), I tried to run it.
I receive the following error:
Error: File is too large for MATLAB to run.
What can I do to resolve this error?

Risposta accettata

Walter Roberson
Walter Roberson il 18 Dic 2019
Starting in R2019b, program files larger than approximately 128 MB do not open or run. For files that contain only code (for example, .m and .p files), this limit affects the file size. For files that store more than just code (for example, .mlx files), it affects the size of the code. Running statements larger than 128 MB, either directly in the Command Window or using the eval function, also is not supported. In addition, code with high levels of complexity, such as a large number of deeply nested if statements, is not supported.
Large program file or statement sizes could result in unpredictable behavior and often occurred when using large portions of code (for example, over 500 lines) to define variables with constant values. To decrease the size of program files, consider defining the variables and saving them in a data file (for example, a MAT-file or .csv file). Then you can load the variables instead of executing code to generate them. This adjustment not only decreases the file size of your program but also can increase performance.
  5 Commenti
Vitor Manuel Ribeiro
Vitor Manuel Ribeiro il 28 Lug 2022
I am curently having similar issue reported by corentin gut. I have a large symbolic expressions that i previously saved to m files (but not using matlabFunction since i run into memory issues), using fopen and fprintf functions. However unfortunately i run into the problem "File is too large for MATLAB to run."
Any way to go around this? I guess that if i use simplify i will have simpler and shorter expressions but it will consume many time.
Regards,

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by