David83
Advanced Member level 1
- Joined
- Jan 21, 2011
- Messages
- 410
- Helped
- 45
- Reputation
- 92
- Reaction score
- 45
- Trophy points
- 1,308
- Activity points
- 3,639
t = 0:0.5:8; %create a vector called t that starts at zero, and increments in steps of .5 until it reaches 8.
y = sin(t); %create a vector whose values are the sine of each value in t.
g = sin(t+pi/8); %create a vector whose values are the sine of each value in t plus pi/8
plot(g);
hold on
plot(y);
Cv = cov(y,g)
Cv =
0.5113 0.4829
0.4829 0.5297
m(:,1) = y; %create a matrix and set its first column to equal our y values
m(:,2) = g; %set its second column to equal our g values
cov(m) %compute the covariance of m
ans =
0.5113 0.4829
0.4829 0.5297
noise=zeros(N,2);%The noise vector size is N-by-1
for ii=1:2
n=%generate the noise
noise(:,ii)=n;
NoiseCov=cov(noise);
end
N = 1024;
noise = zeros(N,2);
for ii = 1:2
n = wgn(N,1,1); %creates a Nx1 vector of zero-mean white gaussian noise
noise(:,ii) = n;
end
NoiseCov = cov(noise)
NoiseCov =
1.1904 -0.0152
-0.0152 1.2064
plot(noise(:,1),noise(:,2))
I am sorry, but the covariance matrix of a noise vector that is N-by-1 is N-by-N.
If the entries in the column vector[/I]
are random variables, each with finite variance, then the covariance matrix...
CvMatrix = cov(SA,ICS)
ans =
3.5152 5.0303
5.0303 12.6288
nSamples= 1024;
noise = zeros(nSamples,1);
nFrames=10;
for ii = 1:nFrames
x = wgn(nSamples,1,1);
noise(:,ii) = x;
end
NoiseCov = cov(noise);
surf(NoiseCov);
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?