No BSD License  

Highlights from
specwelch

4.0

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

specwelch

by alex sanchez

 

12 Jul 2006 (Updated 13 Jul 2006)

Spectrum using Welch's method

| 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

Contact us at files@mathworks.com