EE 131A project code

EE 131A project code - ----------------------...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Simulation 1 (code) ---------------------- >> randn('seed',1234); N=randn(1,M); rand('seed',2345); S1=rand(1,M); S2 = S1  >= .5; S=1; SS = S*(2*S2-1); X=SS+N; XX=X.*S2; X1=XX<0; M1=sum(S2); X11=sum(X1); X11/M1 Simulation 2 (code) 
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ---------------------- randn('seed',1234); N=randn(1,M); rand('seed',2345); S1=rand(1,M); S2 = S1 &gt;= .5; S=2.0091 SS = S*(2*S2-1); X=SS+N; XX=X.*S2; X1=XX&lt;0; M1=sum(S2);...
View Full Document

Ask a homework question - tutors are online