Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: random numbers
Date: Wed, 17 Jun 2009 09:03:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <h1abg5$t3k$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1245229381 29812 172.30.248.38 (17 Jun 2009 09:03:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 17 Jun 2009 09:03:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1879339
Xref: news.mathworks.com comp.soft-sys.matlab:548202


Hello.... please i need your help with this. I want to generate a random sequence of that value...so i used this [Msgsize= round(rand(floor(number),1))]. After generating that i used a key such that whenever i  call the function it gives me exactly that particular random sequence. i know i'm generating randomly but using the key should give me the exact numbers back, because i need the numbers to not change.

Please can someone let me know if i'm on the right track..
many thanks


function [Msgsize] = sizetext(number,key)
number = 300 * 15;
Msgsize= round(rand(floor(number),1));
Msgsize= randintrlv(Msgsize, key);