Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

[MATLAB] Run following commands once, before starting your Matlab programming se

ID: 2079573 • Letter: #

Question

[MATLAB]

Run following commands once, before starting your Matlab programming session to generate true random numbers:

s = RandStream.create('mt19937ar','seed',sum(100*clock)) ; RandStream.setGlobalStream(s) ;

Q1 By simulating WGN in Matlab, find the probability that a WGN variable will be larger than value . WGN has mean µ and standard deviation . Run the following codes once to obtain the values for your simulation. These values should be noted in your solution.

µ = 4 - rand(1,1) ; = 3 ; = µ - 1 + 2*rand(1,1) ;

You also need to verify your results by evaluating the probability using erfc( ) function.

Explanation / Answer

mu = 4 - rand(1,1) ;
sig = 3 ;
s = RandStream.create('mt19937ar','seed',sum(100*clock)) ;
RandStream.setGlobalStream(s) ;
alp = mu - 1 + 2*rand(1,1);
count=0;
if s >= alp
count=count+1;
end
probability1=count/length(s)
probability2=erfc(s);
if probability1 >= probability2
disp('hence proved')
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote