Amelio Vazquez-Reina
Amelio Vazquez-Reina

Reputation: 96284

Checking how much memory MATLAB asks for

I was wondering if there is a way of knowing how much memory a function or a session in MATLAB that runs out of memory asked for.

For example, when MATLAB sends an Out of memory error, does the OS (Windows and/or Linux) register the event of MATLAB requesting more memory than the OS could give it?

Upvotes: 0

Views: 819

Answers (1)

Amro
Amro

Reputation: 124563

One option is to call:

dbstop if error

When the error is thrown, MATLAB will go in debug mode and jump to the offending line, that way you can find how much memory was requested...

Upvotes: 3

Related Questions