I am running my code, and it seems to be needing more and more memory, I check the windows memory and it stays the same giving matlab 1 Gb instead of the 6 or 24 that is availible to it. I have been trying sparce I have "clearvars -global" and "clear all" at the beginning of my code I have reassignment to "=" and sparse, but Matlab doesn't use or direct me to where or why it can't use the the 32 it has detected of system memory but gives up when it knows it is using 2 Gb according to the memory command.
Out of memory. Type "help memory" for your options.
Error in dembedding_v8 (line 165)
fd_square_inv_alligned = s_param_inv_alligned .* y;
Name Size Bytes Class Attributes
x1 1x1 8 double
x2 1x1 8 double
x3 1x1 8 double
x4 1x1 8 double
x5 1x88 176 char
x6 1x90 180 char
x7 1x87 174 char
x8 1x50000 400000 double
x9 1x1 8 double
x10 1x1 8 double
x11 1x1 8 double
x12 1x1 8 double
x13 1x1 8 double
x14 100084x1 800672 double
x15 50000x1 800000 double complex
x16 50000x1 800000 double complex
x17 1x100000 800000 double
x18 1x1 8 double
x19 1x1 8 double
x20 1x100000 800000 double
y21 1x100000 1600000 double complex
note: summing the bytes in whos I get 6001290B or 6MB? which doesn't seem right
Maximum possible array: 24202 MB (2.538e+10 bytes) *
Memory available for all arrays: 24202 MB (2.538e+10 bytes) *
Memory used by MATLAB: 2156 MB (2.261e+09 bytes)
Physical Memory (RAM): 32768 MB (3.436e+10 bytes)
* Limited by System Memory (physical + swap file) available.
Edit: Thank you all for your help and insite with the .* failure(doing a matrix square instead of a 1 by x vector resutl I was getting a x by x size matrix) I am able to do 100,000,000 elements for accuracy and add a 1 million for loop all excecuting. Thank you all for your help and comments.