Increase memory used by Matlab

204 Ansichten (letzte 30 Tage)
Gil
Gil am 15 Mär. 2012
Kommentiert: Frederick am 23 Nov. 2014
I have Windows 7 (64 bits) and I would like to increase the performance of Matlab (version R2011b). I would like to know how to configure Windows to let Matlab to use more memory, because I think 513MB of 24GB is too low. The memory state is as follows:
<<
Maximum possible array: 45917 MB (4.815e+010 bytes) *
Memory available for all arrays: 45917 MB (4.815e+010 bytes) *
Memory used by MATLAB: 513 MB (5.382e+008 bytes)
Physical Memory (RAM): 24574 MB (2.577e+010 bytes)
* Limited by System Memory (physical + swap file) available.
>>
Can anyone help me?
Thank you very much in advance.
Gil
  2 Kommentare
Wenlong
Wenlong am 26 Jul. 2012
Hi, Gil
May I know how to increase the memory size like you did?
Physical Memory (RAM): 24574 MB (2.577e+010 bytes)
Did you reset the virtual memory or just buy extra memory?
Many thanks in advance.
Best wishes Wenlong
KingLizard111
KingLizard111 am 9 Jun. 2014
Hi, can I ask you how did you manage to have such a big Maximum possible array size?
Thank you

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jan
Jan am 15 Mär. 2012
The 513 MB means the currently used memory. This is increased automatically, when you define new arrays. "Memory available for all arrays: 45917 MB" seems like you are using a large virtual memory block, because you have installed 24 GB only.
  6 Kommentare
Jason Ross
Jason Ross am 15 Mär. 2012
So if the memory used is only 282MB and the CPU is idling, I would guess that you are doing something else that is limiting the speed of execution -- are you reading a file from a disk or network?
But as Jan says, this quickly becomes a guessing game without knowing what is going on in the code.
Frederick
Frederick am 23 Nov. 2014
Hi, I'm having the same problem as above, and I know it's because my script is written very badly. Would you mind helping me out with this? The piece of code taking hours and hours to calculate is:
Fr = zeros(length(omega_interp),t_end);
Fi = zeros(length(omega_interp),t_end);
for t = 1:t_end;
for i=1 : length(omega_interp);
for j = i+1 : length(omega_interp);
Fr(i,t) = Fr(i,t) + 2*sum(Amp(i)*Amp(j).*(QTFREAL_Final(i,j)+QTFREAL_Final(j,i)) .* cos(((omega_interp(i)-omega_interp(j))*t)+(eps(i)-eps(j))));
end
end
end
end
So what I want to do is compute (Second order wave drift forces) over time (thats the first for loop), over varying frequency (hence the two for loops in my script). I know matlab is better with matrices, however, i get a bit lost with the cos((omega(i)-omega(j))*t)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Daniel Shub
Daniel Shub am 15 Mär. 2012
If memory is available and MATLAB can benefit from it, MATLAB will uses it. When MATLAB doesn't need the memory anymore, it gives it back. You can see this with:
memory
Memory used by MATLAB: 262 MB (2.747e+008 bytes)
x = randn(1e8, 1); % This is all my poor little Windows box can handle
memory
Memory used by MATLAB: 1025 MB (1.075e+009 bytes)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by