PROBLEM IN GENERATING A REFERENCE SIGNAL

1 view (last 30 days)
raj
raj on 15 Apr 2012
K discrete time real-valued random reference signals are stationary, but possibly correlated, and are described by the vector
x(n) = [x1(n) x2(n).....xk(n)]
How can I implement such a signal in matlab please help me.

Answers (1)

Wayne King
Wayne King on 15 Apr 2012
Well
K = 5;
X = randn(100,5);
Will give you K=5 discrete-time real-valued stationary random vectors. If you want to introduce correlation, there are countless ways to do that. You could use a moving average filter for example.
b = 1/3*ones(3,1);
X = randn(100,K);
X = filter(b,1,X);
The above gives you 5 discrete-time real-valued stationary random vectors, which definitely have autocorrelation functions that are nonzero at nonzero lags and possibly are cross-correlated as well.
If you introduce something like a common harmonic component in each, you certainly have cross-correlation between the vectors.
b = 1/3*ones(3,1);
K = 5;
X = randn(100,K);
X = filter(b,1,X);
Y = repmat(cos(pi/5*(0:99))',1,5);
X = X+Y;

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!