From: Jon on 31 May 2010 17:30 Does anyone have any ideas on making the following code faster? offset = [1:step:length(x)-win_size]; S = zeros (n, length(offset)); for i=1:length(offset) S(1:win_size, i) = x(offset(i):offset(i)+win_size-1) .* window; end I'm running through sections of long high sample rate wave files (250khz) so each x vector that comes through to the spectrogram is 12500 samples. The problem here is that profiler says "S(1:win_size, i) = x(offset(i):offset(i)+win_size-1) .* window;" takes 3 times longer than the fft itself which is done on S.
|
Pages: 1 Prev: Derivatives in Embedded Matlab Next: Generate random numbers from a particular function |