This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
12 | Y = fftshift(fft(y),1); | 860 | 0.251 s | 92.0% |  |
13 | f = [-length(Y)/2:length(Y)/2-... | 860 | 0.022 s | 8.0% |  |
19 | end | 860 | 0 s | 0% |  |
14 | f = f(:); | 860 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.273 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
fftshift | function | 860 | 0.164 s | 60.0% |  |
Self time (built-ins, overhead, etc.) | | | 0.109 s | 40.0% |  |
Totals | | | 0.273 s | 100% | |
Code Analyzer results
Line number | Message |
13 | Use of brackets [] is unnecessary. Use parentheses to group, if needed. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 19 |
Non-code lines (comments, blank lines) | 15 |
Code lines (lines that can run) | 4 |
Code lines that did run | 4 |
Code lines that did not run | 0 |
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