generate a random number of 128bits
Show older comments
hello would you please help me generate a random number of 128bits This is my first time using the Mathlab and I have no idea how I should start. thank you
2 Comments
Walter Roberson
on 10 Jun 2013
What output format are you looking for? MATLAB does not support any 128 bit numeric formats (except perhaps in the Fixed Point Toolbox)
KHADIJA
on 17 Jun 2013
sorry i couldn t reply befor i would like it in 128-bit unsigned integer format,something like that : 89a8 a8b2 e858 d8b8 f263 3f44 d2d4 ce9a thanks you walter for answering me
Answers (2)
Walter Roberson
on 17 Jun 2013
[dec2hex(floor(rand * 2^48), 12), dec2hex(floor(rand * 2^16), 4)]
Azzi Abdelmalek
on 10 Jun 2013
Edited: Azzi Abdelmalek
on 10 Jun 2013
A=randi(2,1,128)-1
%or
A=num2str(randi(2,1,128)-1);
A(strfind(A,' '))=[]
1 Comment
KHADIJA
on 17 Jun 2013
thanks aziz for answering,and sorry but i couldn t reply befor. it s working but it generates 256 Bytes thats moe than i need any other suggestions? thank you in adnvance
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!