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
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?