Professional Documents
Culture Documents
19BCS2056 MS2
19BCS2056 MS2
2. Objective : Apply the knowledge of Modelling and Simulation to implement the basic
components like random number generator, linear congruential generator, etc
4. Algorithm/Flowchart :
a=19;
b=-3332;
m=2^13;
f=@(x) mod((a*x)+b,m);
x(1)=1;
for i=1:m
x(i+1)=f(x(i));
end
x
d=0;
for i=1:m
if x(i+1)==x(1)
d=i;
break;
end
end
6. Result/Output/Writing Summary: