Commit 601f6548f208f630c8c6e4f367bb9b40504b8c69
1 parent
f89a1f5199
Exists in
master
use power spectral density
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
psdplot.m
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | cc = 'bkcgmry'; |
13 | 13 | for i = [1:length(col)] |
14 | 14 | data.freq = load(filename)(:,col(i)).*mult(i); |
15 | - [p, f] = pwelch(data.freq, hanning(length(data.freq)/8), 0.5, [], data.rate, 'onesided'); | |
15 | + [p, f] = pwelch(data.freq, hanning(length(data.freq)/1), 0.5, [], data.rate, 'onesided', 'power'); | |
16 | 16 | semilogx(f, 10*log10(p), cc(mod(i, length(cc)))) |
17 | 17 | leg{i} = strcat(filename, ' col', num2str(col(i))); |
18 | 18 | hold on |