Path: news.mathworks.com!not-for-mail
From: "Carla Soares" <carla.soares@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: help on triple integral
Date: Mon, 5 Jul 2010 16:48:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <i0t2cj$m4p$1@fred.mathworks.com>
References: <i0amlt$e1b$1@fred.mathworks.com> <i0oqng$lm1$1@fred.mathworks.com>
Reply-To: "Carla Soares" <carla.soares@gmail.com>
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 1278348499 22681 172.30.248.38 (5 Jul 2010 16:48:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 5 Jul 2010 16:48:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2400761
Xref: news.mathworks.com comp.soft-sys.matlab:650504

Thanks for your reply! I'm sorry, but I don't get it completly... I now have:

    for x=-A:R-A;
        int1 = @(y,z) (-alpha*(cdf(max(0,max(0,max(0,R-max(0,A+x))-max(0,A+x+y))-max(0,A+x+y+z))))).*pdf(z).*pdf(x).*pdf(y);
        ymin = -1e5;
        ymax = max(0,R-max(0,A+x));
        zmax = @(y) max(0,max(0,R-max(A+x))-max(0,A+x+y));
        int2 = quad2d(int1,ymin,ymax,ymin,zmax);
    end

int1 is my original integrand with the 3 variables. A and R are changing values in another loop and cdf and pdf are functions handles for the cdf and pdf of the normal.
But this gives me a value (and I guess only for the last assumed value of x), I don't see how I get to integrate over x...
Sorry if this is very basic, but I'm not managing to figure it out...