{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw2-solution

# hw2-solution - HW#2solution Monday,February02,2009 3:42PM...

This preview shows pages 1–3. Sign up to view the full content.

% MATLAB Code 1.8250 0.6697 0.4698 0.6697 2.9028 0.3542 0.4698 0.3542 0.8086 >> [u s]= eig(Kg) u = 0.4259 0.8037 0.4155 0.2450 0.3397 0.9081 0.8709 0.4886 0.0522 s = 0.2296 0 0 0 3.3401 0 0 0 10.4303 Problem 1: 2.5488 1.3414 2.3884 0.2296 0.0000 0.0000 0.0000 3.3401 0.0000 0.0000 0.0000 10.4303 Problem 2: (a) MATLAB code: Note that the MATLAB codes given in this solution are not the most efficient implementation, but they are easier to understand. HW#2 solution Monday, February 02, 2009 3:42 PM Page 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
N = 100; f = randn(3,N); Kg = [4 3 -1;3 9 1;-1 1 1]; A = Kg^(1/2); % there are multiple ways of finding % a transformation matrix A % because it is not unique for i = 1:N g(:,i) = A*f(:,i)+[1;2;3]; end; mean_g = mean(g,2) K_g = cov(g') Results: mean_g = 0.8011 1.7970 2.9815 K_g = 4.3285 2.9448 1.0159 2.9448 8.6566 1.1413 1.0159 1.1413 0.9794 (b) They are not exactly equal to Kg in problem 1 (c) because of finite number of samples (N=100). The accuracy will improve as we increase N.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

hw2-solution - HW#2solution Monday,February02,2009 3:42PM...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online