Error: File is too large for MATLAB to run.

22 Ansichten (letzte 30 Tage)
SE
SE am 18 Dez. 2019
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 18 Dez. 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 Kommentare
Vitor Manuel Ribeiro
Vitor Manuel Ribeiro am 28 Jul. 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,
Vitor Manuel Ribeiro
Vitor Manuel Ribeiro am 28 Jul. 2022
i am using matlab r2022a

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by