generate a random number of 128bits

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

What output format are you looking for? MATLAB does not support any 128 bit numeric formats (except perhaps in the Fixed Point Toolbox)
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

Sign in to comment.

Answers (2)

[dec2hex(floor(rand * 2^48), 12), dec2hex(floor(rand * 2^16), 4)]
Azzi Abdelmalek
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

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

Sign in to comment.

Categories

Asked:

on 10 Jun 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!