generate unique random matrix using key

1 次查看(过去 30 天)
i want to get a key(integers/character/string) from the user and generate a random matrix using that key and particular to that key only. meaning if i again use that key for generating a matrix i would get similar matrix.matrix should be having unit8 values less than 256.
  2 个评论
Jan
Jan 2013-8-12
How large is the key and the matrix?
vardhit
vardhit 2013-8-12
matrix can be as large as an image matrix can be.. i really dont have any idea about key..but if u ask me about the sample space of key.i want it to be from integer 1-100.or even a string.

请先登录,再进行评论。

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-8-11
编辑:Azzi Abdelmalek 2013-8-11
key=3 % for example
rng(key)
out=uint8(randi([0 255],2,4) % matrix 2x4
  7 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2013-8-11
I don't know if it's due to the version of your Matlab, or there is another problem. Maybe you should contact Mathworks technical support

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by