%% Modified-Covariance PSD Estimate of a Multichannel Signal
% Create a multichannel signal consisting of three sinusoids in additive N(0,1) white Gaussian noise. The sinusoids' frequencies are 100 Hz, 200 Hz, and 300 Hz. The sampling frequency is 1 kHz, and the signal has a duration of 1 s.

Fs = 1000;

t = 0:1/Fs:1-1/Fs;

f = [100;200;300];

x = cos(2*pi*f*t)'+randn(length(t),3);

%
% Estimate the PSD of the signal using the modified covariance method with a 12th-order autoregressive model. Use the default DFT length. Plot the estimate.

morder = 12;

pmcov(x,morder,[],Fs)

% Copyright 2015 The MathWorks, Inc.