This is a static copy of a profile report

Home

ffto (860 calls, 0.273 sec)
Generated 05-Aug-2011 13:03:47 using cpu time.
function in file /home/LeechJ/cbass_analysis/matutils/ffto.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
fitOneOverFfunction860
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
12
Y = fftshift(fft(y),1);
8600.251 s92.0%
13
f = [-length(Y)/2:length(Y)/2-...
8600.022 s8.0%
19
end
8600 s0%
14
f = f(:);
8600 s0%
All other lines  0 s0%
Totals  0.273 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
fftshiftfunction8600.164 s60.0%
Self time (built-ins, overhead, etc.)  0.109 s40.0%
Totals  0.273 s100% 
Code Analyzer results
Line numberMessage
13Use of brackets [] is unnecessary. Use parentheses to group, if needed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function19
Non-code lines (comments, blank lines)15
Code lines (lines that can run)4
Code lines that did run4
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function [f,Y] = ffto(y,fs)
2 % Wrapper for the fft function.
3 % Inputs:
4 % y - sampled data
5 % fs - sample frequency in Hz
6 % Outputs:
7 % f - frequency vector of the fft spectrum [units of Hz]
8 % Y - fftshift(fft(y))
9 %
10 % ogk
11
0.25 860 12 Y = fftshift(fft(y),1);
0.02 860 13 f = [-length(Y)/2:length(Y)/2-1]*fs/length(Y);
860 14 f = f(:);
15 % Alternative calculation:
16 % F = [0:length(Y)-1]*fs/length(Y);
17 % f = [-fliplr(F(2:length(F)/2+1)) F(1:length(F)/2)];
18
860 19 end