Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Generate random numbers from a particular function
Date: Mon, 31 May 2010 22:10:19 +0000 (UTC)
Organization: Florida Institute of Technology
Lines: 9
Message-ID: <hu1c4b$5t7$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1275343819 6055 172.30.248.38 (31 May 2010 22:10:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 31 May 2010 22:10:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 934319
Xref: news.mathworks.com comp.soft-sys.matlab:641007

Hi all,

I need to generate RN's from a double hyperbolic tangent function.

f(x) = p(1) .* (tanh((x - p(2)) ./ p(4))- tanh((x - p(3)) ./ p(5))

I can't do it using the inverse-transform method because it's not possible to solve for x. Does anybody know of a routine that works the Composition, or convolution or any other methods??

Thanks