When do I run my program it gives the error i.e. Error using ==> mldivide

my program is
load A;
load b;
c = reshape(b,[],1);
d = A/b;
error given is
Out of memory. Type HELP MEMORY for your options.
Error in ==> mm at 6
d = A/b;

Answers (2)

What do you want to do? Some kind of least squares regression? Why is this labeled image analysis? Why are you reshaping? What is b (the variable, not the filename) before it is reshaped? What is A (the variable, not the filename)?
Matlab suggest to read help memory to solve the problem. Did you do this and why did the suggestions help? If not, why not?
"Out of memory" means, that your memory is exhausted. This could happen, if the loaded matrix A is very large, or if you have other arrays, ehich exhaust the memory. In both cases, the typical steps are useful:
  • Clear variables, which are not needed anymore
  • Install more RAM
  • Use a 64 bit version of Matlab and the OS
  • Install even more RAM
  • Close other programs
  • Increase the virtual memory, but it is better to invest money in much more RAM
  • Use smaller data types, e.g. SINGLE instead of DOUBLE, whenever it is possible and scientifically sufficent.

This question is closed.

Asked:

on 10 Apr 2013

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!