MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > Randomize between two non contiguous numbers 

Subject: Randomize between two non contiguous numbers From: thesimulator Hassen Date: 3 Jan, 2011 10:23:04 Message: 1 of 10 
Hi guys, 
Subject: Randomize between two non contiguous numbers From: Greg von Winckel Date: 3 Jan, 2011 10:55:05 Message: 2 of 10 
Do you want a uniform distribution of 2s and 5s? 
Subject: Randomize between two non contiguous numbers From: Oleg Komarov Date: 3 Jan, 2011 11:01:07 Message: 3 of 10 
"Tewodros Hassen" wrote in message <ifs828$332$1@fred.mathworks.com>... 
Subject: Randomize between two non contiguous numbers From: Oleg Komarov Date: 3 Jan, 2011 11:05:04 Message: 4 of 10 
"Greg von Winckel" wrote in message <ifs9u9$31j$1@fred.mathworks.com>... 
Subject: Randomize between two non contiguous numbers From: Tewodros Hassen Date: 3 Jan, 2011 11:31:04 Message: 5 of 10 
Yes, It works for the example I forward in my question. But can we make it moe general? Like not only for two numbers? Or in another word can we generate 100 numbers which are a uniform distribution of any three numbers ? 
Subject: Randomize between two non contiguous numbers From: Oleg Komarov Date: 3 Jan, 2011 11:42:04 Message: 6 of 10 
"Tewodros Hassen" wrote in message <ifsc1o$hio$1@fred.mathworks.com>... 
Subject: Randomize between two non contiguous numbers From: Greg von Winckel Date: 3 Jan, 2011 11:45:22 Message: 7 of 10 
"Tewodros Hassen" wrote in message <ifsc1o$hio$1@fred.mathworks.com>... 
Subject: Randomize between two non contiguous numbers From: Tewodros Hassen Date: 3 Jan, 2011 11:53:05 Message: 8 of 10 
"Greg von Winckel" wrote in message <ifscsi$b9r$1@fred.mathworks.com>... 
Subject: Randomize between two non contiguous numbers From: Jos (10584) Date: 3 Jan, 2011 12:43:04 Message: 9 of 10 
"Greg von Winckel" wrote in message <ifscsi$b9r$1@fred.mathworks.com>... 
Subject: Randomize between two non contiguous numbers From: Rizki Date: 4 May, 2013 22:05:09 Message: 10 of 10 
This thread really helps my project, thank you so much :D 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.