Does repeated use of ngrid suck up memory?

조회 수: 1 (최근 30일)
David Koenig
David Koenig 2012년 9월 22일
I calculate a 60,000 by 1000 grid using Matlab's ngrid function. While staying in the same script I often have to recalculate the grid for slightly different parameters. Each time I do it more time is required as measured by tic and toc.
The guts of the grid calculation are
% h=sampling interval, M= no. of samples
t=(1:M)*h; % time spacing
% fLfine=starting frequency, fRfine=stopping frequency % DelFreq=frequency interval
fs=fLfine:DelFreq:fRfine; % frequency spacing
[T F]=ndgrid(t,fs);
parameterList.A=exp(-1i*2*pi*F.*T);
T=[]; F=[];
Each time I pass through this calculation it takes longer. I notice it when I try the script on my Acer Aspire which has 4 gB memory. I don't notice it when I use my Toshiba Qosmio X775 which has 8 gB of memory and a faster processor.
Is there a reason why it takes progressively longer on the Acer and is there anything I can do about it?
Thanks,
Dave

답변 (0개)

카테고리

Help CenterFile Exchange에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by