Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!x5g2000yqk.googlegroups.com!not-for-mail
From: Deivy <deivy71@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Generating Random numbers
Date: Thu, 2 Jul 2009 04:24:11 -0700 (PDT)
Organization: http://groups.google.com
Lines: 13
Message-ID: <d639c2c7-c672-4177-b89b-5c584755dabc@x5g2000yqk.googlegroups.com>
NNTP-Posting-Host: 130.238.8.198
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1246533851 32189 127.0.0.1 (2 Jul 2009 11:24:11 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 2 Jul 2009 11:24:11 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x5g2000yqk.googlegroups.com; posting-host=130.238.8.198; 
	posting-account=twjtNAoAAAD5eFO488SppmbV-BtF0_IO
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) 
	AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:552333


Hi Group,
I would like to generate a set of numbers between 500 and 600 so that
the total of them would be 3000.
How many numbers to generate is unknown but the generated numbers
should be within the range of 500 to 600 they should total to 3000.
How do I do this in matlab.
Could someone help me with this.

A small script that accomplishes this task is highly appreciated.

Thank you,
Regards,
Deivy