4.0

4.0 | 3 ratings Rate this file 117 downloads (last 30 days) File Size: 6.94 KB File ID: #11690

specwelch

by alex sanchez

 

12 Jul 2006 (Updated 13 Jul 2006)

No BSD License  

Spectrum using Welch's method

Download Now | Watch this File

File Information
Description

Spectrum using Welch's method

USAGE:
  q = specwelch(x,dt,w,Nsg,pnv,Wn,ftype,n)
  [psdf,f] = specwelch(x,dt,w,Nsg,pnv,Wn,ftype,n)
  [psdf,conf,f] = specwelch(x,dt,w,Nsg,pnv,Wn,ftype,n)

DESCRIPTION:
  Calculates the spectrum for x
  using Welch's method.
  The confidence intervals are calculated
  using the inverse of chi-square CDF.
  Also includes a filtering option using the
  butterworth filter to see the effect of the
  filter on the spectrum

INPUT VARIABLES:
  x - Time series, [vector]
  dt - Sampling Rate, [scalar]
  win - Window, one of:
      'hanning', 'hamming', 'boxcar'
  Nsg - Number of Segments (>=1)
  pnv - Percentage Noverlap of Segments (0-100)
  Nb - Band Averaging, number of bands to average
  Wn - Cut-Off frequencies, used for filtering
  ftype - Type of filter, 'high', 'low' or 'stop'
  n - Number of coefficients to use in
  the Butterworth filter

OUTPUT VARIABLES:
  q - structure with the following fields:
      xp - detrended x
      f = Frequencies
      T - Periods
      m - Magnitude
      a - Amplitude
      s - Power spectrum, Sxx(win), [Power]
      psdw - Power Spectral Density, Pxx(win), [Power/rad/sample]
      psdf - Power Spectral Density, Pxx(f), [Power/sample-freq]
      psdT - Power Spectral Density, Pxx(T), [Power*time-unit]
      conf - Upper and Lower Confidence Interval multiplication
              factors using chi-squared approach

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
30 Oct 2006 ilaria eos  
03 Jan 2007 Vishnuvenkatesh Dhage  
15 Nov 2007 john P

Could be great, but requires some toolbox(es). There is no specification of which ones.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
spectral analysis alex sanchez 22 Oct 2008 08:32:32
spectrum alex sanchez 22 Oct 2008 08:32:32
welch alex sanchez 22 Oct 2008 08:32:32
signal processing alex sanchez 22 Oct 2008 08:32:32
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com