Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Compute a bivariate probability mass function on a predefined grid without loops
Date: Sun, 22 Apr 2012 09:17:15 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 13
Message-ID: <jn0iar$ar0$1@newscl01ah.mathworks.com>
References: <jms4dg$7db$1@newscl01ah.mathworks.com> <jmtam1$e0q$1@newscl01ah.mathworks.com> <jmu49f$j4h$1@newscl01ah.mathworks.com> <jmu8rb$6fh$1@newscl01ah.mathworks.com> <jmuhhc$97p$1@newscl01ah.mathworks.com> <jmujvn$i1b$1@newscl01ah.mathworks.com> <jmum1d$pfn$1@newscl01ah.mathworks.com> <jn0gib$4dv$1@newscl01ah.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1335086235 11104 172.30.248.45 (22 Apr 2012 09:17:15 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 22 Apr 2012 09:17:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:765490

> 
> p = (Sk-k(1))*((N-1)/(k(N)-k(1)))+1
> 

Addendum:

Read from the code of LINSPACE, with the inversion calculation (note the parenthesis)

p = ( ( (Sk-k(1)) * (N-1) ) ./ (k(N)-k(1)) ) + 1;

should undo accurately what LINSPACE did.

Bruno