Você está na página 1de 3

>> asa183_test

08-Jul-2008 14:16:31
ASA183_PRB
MATLAB version
Test the routines in the ASA183 library.
ASA183_TEST01
R8_RANDOM computes pseudorandom values.
Three seeds, S1, S2, and S3, are used.
R
0.294227
0.112944
0.685823
0.330013
0.302333
0.844439
0.561165
0.592238
0.704393
0.891146

S1

S2

S3

12345
22434
22320
2826
29211
696
28209
10968
29119
15233
1709

34567
5352
11334
9800
18715
6438
16284
12604
16091
9715
4095

56789
11416
48
8160
22665
2029
11377
23741
3011
26702
21213

ASA183_TEST02
Examine the average and variance of a
sequence generated by R8_RANDOM.
Now compute 100000 elements.
Average value = 0.500210
Expecting
0.500000
Variance =
Expecting

0.083257
0.083333

ASA183_TEST03
Show how the seeds used by R8_RANDOM,
which change on each step, can be reset to
restore any part of the sequence.
Begin sequence with following seeds:
S1 = 12345
S2 = 34567
S3 = 56789
I
1
2
3
4
5
6
7
8
9
10

R
0.294227
0.112944
0.685823
0.330013
0.302333
0.844439
0.561165
0.592238
0.704393
0.891146

S1

S2

S3

22434
22320
2826
29211
696
28209
10968
29119
15233
1709

5352
11334
9800
18715
6438
16284
12604
16091
9715
4095

11416
48
8160
22665
2029
11377
23741
3011
26702
21213

Restart the sequence, using the seeds


produced after step 5:
I

1
2
3
4
5
6
7
8
9
10

0.844439
0.561165
0.592238
0.704393
0.891146
0.821462
0.783654
0.800228
0.683281
0.072337

S1

S2

S3

28209
10968
29119
15233
1709
19818
29019
28402
13702
12329

16284
12604
16091
9715
4095
7279
9401
10701
22152
21769

11377
23741
3011
26702
21213
28096
15609
15429
15152
28708

ASA183_TEST04
R4_UNI computes pseudorandom values.
Two seeds, S1 and S2, are used.
R

S1
12345
493972830
390105768
1781664868
1526187241
866180343
1103021545
1221914854
1942689135
153034416
1043483711

0.575025
0.945577
0.253573
0.883384
0.794246
0.976838
0.246036
0.928839
0.986301
0.232776

S2
34567
1406600364
506978341
1237121178
1776619217
1308034228
1152761561
693555855
2095505401
182453399
543601765

ASA183_TEST05
Examine the average and variance of a
sequence generated by R8_UNI.
Now compute 100000 elements.
Average value = 0.500317
Expecting
0.500000
Variance =
Expecting

0.083519
0.083333

ASA183_TEST06
Show how the seeds used by R8_UNI,
which change on each step, can be reset to
restore any part of the sequence.
Begin sequence with following seeds:
S1 = 12345
S2 = 34567
I
1

S1

S2

0.575025 493972830 1406600364

2
3
4
5
6
7
8
9
10

0.945577
0.253573
0.883384
0.794246
0.976838
0.246036
0.928839
0.986301
0.232776

390105768
1781664868
1526187241
866180343
1103021545
1221914854
1942689135
153034416
1043483711

506978341
1237121178
1776619217
1308034228
1152761561
693555855
2095505401
182453399
543601765

Restart the sequence, using the seeds


produced after step 5:
I
1
2
3
4
5
6
7
8
9
10

S1
0.976838
0.246036
0.928839
0.986301
0.232776
0.660200
0.737146
0.523365
0.065935
0.106898

ASA183_PRB
Normal end of execution.
08-Jul-2008 14:22:04
>>

1103021545
1221914854
1942689135
153034416
1043483711
434296545
504959834
1937436972
446373308
560752841

S2
1152761561
693555855
2095505401
182453399
543601765
1164011680
1069434216
813520136
304778527
331191459

Você também pode gostar