From 601f6548f208f630c8c6e4f367bb9b40504b8c69 Mon Sep 17 00:00:00 2001 From: bma Date: Mon, 7 May 2018 14:16:09 +0200 Subject: [PATCH] use power spectral density --- psdplot.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psdplot.m b/psdplot.m index d8f3c89..7e75ec6 100755 --- a/psdplot.m +++ b/psdplot.m @@ -12,7 +12,7 @@ if length(col) == length(mult) cc = 'bkcgmry'; for i = [1:length(col)] data.freq = load(filename)(:,col(i)).*mult(i); - [p, f] = pwelch(data.freq, hanning(length(data.freq)/8), 0.5, [], data.rate, 'onesided'); + [p, f] = pwelch(data.freq, hanning(length(data.freq)/1), 0.5, [], data.rate, 'onesided', 'power'); semilogx(f, 10*log10(p), cc(mod(i, length(cc)))) leg{i} = strcat(filename, ' col', num2str(col(i))); hold on -- 2.16.4