Code covered by the BSD License  

Highlights from
Power spectral estimation with error bars

Be the first to rate this file! 12 Downloads (last 30 days) File Size: 3.12 KB File ID: #24831
image thumbnail

Power spectral estimation with error bars

by Rune W Berg

 

24 Jul 2009 (Updated 04 Aug 2009)

Power spectral estimation using multitaper, single or multiple traces and estimating error bars.

| Watch this File

File Information
Description

This procedure calculates the averaged single-sided power spectrum with proper normalization, so that if the signal is given in volts, the value is truely the power. It uses multiple tapers to window the data, and thereafter performs a padding. The procedure is inspired by the procedure from the chronux.org software package.

The averaging is taken over both the trials and over multiple tapers (estimates of spectrum for a single trial). These different estimates of the spectrum is also use to calculate standard error of the estimates by boot strap technique.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
21 Nov 2011 Ella Podvalny

There is a bug in SE computation, as px is normalized by df but pow_deleteone is not. You can solve it by:

pow_a = pow_a ./ df;
px = sum(pow_a, 2) / (size(pow_a, 2));

in place of:

px=sum(pow_a,2)/(size(pow_a,2)*df);

Please login to add a comment or rating.
Updates
03 Aug 2009

Better documentation.

04 Aug 2009

Normalization bug now fixed.

Tag Activity for this File
Tag Applied By Date/Time
power Rune W Berg 24 Jul 2009 11:01:37
spectrum Rune W Berg 24 Jul 2009 11:01:37
spectral Rune W Berg 24 Jul 2009 11:01:37
multitaper Rune W Berg 24 Jul 2009 11:01:37
error bars Rune W Berg 24 Jul 2009 11:01:37
taper Rune W Berg 24 Jul 2009 11:01:37
normalization Rune W Berg 24 Jul 2009 11:01:37
prolates Rune W Berg 03 Aug 2009 11:22:47
slepian Rune W Berg 03 Aug 2009 11:22:47
density Rune W Berg 04 Aug 2009 10:06:13
psd Rune W Berg 04 Aug 2009 10:06:13
spectrum smiju k joy 24 Jan 2010 04:48:40

Contact us at files@mathworks.com