Download Help (Windows Only) 
Owning Class: spectral analysis
Requires: MathScript RT Module
psd_welch(x)
psd_welch(x, win)
psd_welch(x, win, noverlap)
psd_welch(x, win, noverlap, fftsize)
psd_welch(x, win, noverlap, range)
psd_welch(x, win, noverlap, fftsize, fs)
psd_welch(x, win, noverlap, fftsize, range)
psd_welch(x, win, noverlap, fftsize, fs, range)
Pxx = psd_welch(x)
Pxx = psd_welch(x, win)
Pxx = psd_welch(x, win, noverlap)
Pxx = psd_welch(x, win, noverlap, fftsize)
Pxx = psd_welch(x, win, noverlap, range)
Pxx = psd_welch(x, win, noverlap, fftsize, fs)
Pxx = psd_welch(x, win, noverlap, fftsize, range)
Pxx = psd_welch(x, win, noverlap, fftsize, fs, range)
[Pxx, w] = psd_welch(x)
[Pxx, w] = psd_welch(x, win)
[Pxx, w] = psd_welch(x, win, noverlap)
[Pxx, w] = psd_welch(x, win, noverlap, fftsize)
[Pxx, w] = psd_welch(x, win, noverlap, range)
[Pxx, w] = psd_welch(x, win, noverlap, fftsize, range)
[Pxx, f] = psd_welch(x, win, noverlap, fftsize, fs)
[Pxx, f] = psd_welch(x, win, noverlap, fftsize, fs, range)
Legacy Name: pwelch
Uses the Welch method to calculate the power spectral density of the input signal. If you do not request an output, this function plots the power spectral density in the current plot window.
Name  Description  

x  Specifies the input signal sequence. x is a real or complex vector.  
win  Specifies the window to apply to each segment of x. The length of win determines the segment length into which LabVIEW divides x. win can be a vector that represents the window coefficients or an integer that represents a Hamming window with a length of win. The default is a Hamming window where LabVIEW divides x into eight sections.  
noverlap  Specifies the number of data elements that overlap between adjacent segments of data. noverlap must be less than the length of win. The default is the length that results in an overlap of half the data elements between adjacent segments.  
fftsize  Specifies the length of the FFT to perform on each segment of the data. The default is the next power of 2 greater than the length of each segment of x if this number is greater than 256. Otherwise, the default is 256.  
fs  Specifies the sampling frequency of the input sequence in Hz. If you specify fs, LabVIEW returns the output frequencies in Hz. Otherwise, LabVIEW returns the output frequencies in radians per sample.  
range  Specifies the range of the power spectral density. range is a string that accepts the following values.

Name  Description 

Pxx  Returns the power spectral density of the input signal x. If x is real and range is 'onesided', the length of Pxx is fftsize / 2 + 1 for an even fftsize and (fftsize + 1) / 2 for an odd fftsize. Otherwise, the length of Pxx is fftsize. 
w  Returns the frequencies in radians per sample at the points where LabVIEW evaluates Pxx. 
f  Returns the frequencies in Hz at the points where LabVIEW evaluates Pxx. 
The following table lists the support characteristics of this function.
Supported in the LabVIEW RunTime Engine  Yes (if you request output) 
Supported on RT targets  Yes (if you request output) 
Suitable for bounded execution times on RT  Not characterized 
fs = 1000;
t = 0:1/fs:0.2;
fftsize = 1024;
noise = randnormal(size(t));
x = sin(2*pi*100*t) + cos(2*pi*250*t) + noise;
win = win_hann2(64);
noverlap = 32;
Pxx = psd_welch(x, win, noverlap, fftsize, fs);
psd_burg
psd_covar
psd_mcovar
psd_periodogram
psd_yule
pspec_eign
pspec_music