Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!s11g2000prs.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to generate vector of random numbers in any interval (e.g.
 [-1 1]) that sums to 1)
Date: Tue, 9 Nov 2010 05:06:27 -0800 (PST)
Organization: http://groups.google.com
Lines: 16
Message-ID: <b693a07a-2c4c-4869-b503-3da2e7be6e8f@s11g2000prs.googlegroups.com>
References: <ibbfkv$l6m$1@fred.mathworks.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1289307987 17021 127.0.0.1 (9 Nov 2010 13:06:27 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 9 Nov 2010 13:06:27 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s11g2000prs.googlegroups.com; posting-host=192.44.136.113; posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12)
 Gecko/20101026 Firefox/3.6.12,gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:685100

On Nov 9, 7:43 am, "Vassilios Vassiliadis"
<v.vassilia...@fme.aegean.gr> wrote:
> Hello,
> I'd like to generate a vector of random numbers,which take values in any interval (e.g. [-1 1]),and this vector sums to 1...
>
> Thanx in advance...
> Vassilis...

------------------------------------------------------------
I'm not sure that's possible.  Can you tell me how you could take a
bunch of numbers in the interval [-100 -50] and have that sum to
1????  If you made the sum equal to 1, you'd no longer have values in
the range -100 to -50 - you'd have to change the range (the values of
the numbers).  I don't think you can have it both ways: both in the
range and with the prescribed sum.