Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Numerical Integration
Date: Fri, 19 Jun 2009 00:36:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <h1emhh$mok$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1245371761 23316 172.30.248.37 (19 Jun 2009 00:36:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 19 Jun 2009 00:36:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1832633
Xref: news.mathworks.com comp.soft-sys.matlab:548797


Hello,

I have the following function

function Psi_Out = Psi(a,b,z)
Fun=@(t)((1./gamma(a)).*exp(-z.*t).*(t.^(a-1)).*((1+t).^(b-a-1)));
Psi_Out =quad(Fun,0,5000);

where a and b are constants, and z is a sumolic expression. When I run the following commands:

syms s;
Psi(2,2,s.^2+2.*s);

an error occurs. Where did I mistake the function?