Wednesday, 28 August 2013

NIST Randomness Tests requires a sequence of ASCII 0's and 1's but does not accept any trial from MATLAB

NIST Randomness Tests requires a sequence of ASCII 0's and 1's but does
not accept any trial from MATLAB

I am trying to use NIST randomness test suite for randomness tests of my
long 0-1 bit sequences. It requires me to supply either the ASCII zeroes
and ones or a binary file each byte with 8 bits of data. However, I tried
save(...,'-ascii'), fwrite() and some other commands to make it works but
it does not accept and it gives a segmentation error + igamc: UNDERFLOW
error.
If anyone can say how to create the exactly matching format I will be
really happy. In addition if anyone knows MATHEMATICA they created their
own sample files as below from MATHEMATICA , maybe can help about the
format and you can tell what to do in MATLAB.
BinExp[num_,d_] := Module[{n,L},
If[d > $MaxPrecision, $MaxPrecision = d];
n = N[num,d];
L = First[RealDigits[n,2]]
];
SE = BinExp[E,302500];
Save["data.e",{SE}];

No comments:

Post a Comment