{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# STA5107_FRADE_HW5 - STA5107 Dr Srivastava Homework 5 Jaime...

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

STA5107: Dr. Srivastava Homework 5 Jaime Frade 1. OUTPUT

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

View Full Document
STA5107: Dr. Srivastava Homework 5 Jaime Frade CODE clear all clc for k=1:3 A=[1,.1,.2;.3,1,.1;.2,.1,1]; B=[1,.5,.2;.5,1,.1]; tau=[.1,0,0;0,.1,0;0,0,.1]; x0=random( 'normal' ,3,1,3,1); n1=10; for i=1:n1 u1=random( 'normal' ,0,1,3,1); x=x0; x=A*x0 + tau*u1; u2 = random( 'normal' ,0,0.2,2,1); y=B*x + u2; for j=1:3; X1(i,j)=x(j); end for j=1:2; Y1(i,j)=y(j); end x0=x; end ; for i=1:n1 normx1(i)=norm(X1(i,:)-X1(1,:)); normy1(i)=norm(Y1(i,:)-Y1(1,:)); end ; figure(1) plot(normx1); title([ '||X(t) - X(1)|| versus time for simulation ' int2str(k)]); saveas(figure(1),[ 'Simulated process- ' int2str(k) ' of x prob 1.png' ]); figure(2) plot(normy1); title([ '||Y(t) - Y(1)|| versus time for simulation ' int2str(k)']); saveas(figure(2),[ 'Simulated process- ' int2str(k) ' of y prob 1.png' ]); end 2.
STA5107: Dr. Srivastava Homework 5 Jaime Frade OUTPUT CODE

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

View Full Document
STA5107: Dr. Srivastava Homework 5 Jaime Frade clear all clc for k=1:3 A=[1,.1,.2;.3,1,.1;.2,.1,1];
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 8

STA5107_FRADE_HW5 - STA5107 Dr Srivastava Homework 5 Jaime...

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

View Full Document
Ask a homework question - tutors are online