How to integrate between a defined and an undefined limit

조회 수: 1 (최근 30일)
Trond Oesten
Trond Oesten 2015년 3월 16일
편집: Trond Oesten 2015년 3월 16일
Hi,
I have performed an double integration of a function containing 3 variables. The function is now only dependent on 1 varaible. Is there an easy way I can integrate the function for this last variable to, but I want it to go between a defined value (lets say 0) and an undefined variable (a). Is there an easy way to do this? or should this be performed as a tripple integral right away? Thanks!
My script:
clc; clear all; close all;
C = [23.875 15.75281; 15.75281 93.9842];
mu_U = 1788.2058;
mu_K = 70.8489;
sigma_U = sqrt(C(1,1));
sigma_k = sqrt(C(2,2));
ubot = mu_U-4*sigma_U;
utop = mu_U+4*sigma_U;
kbot = mu_K-4*sigma_k;
ktop = mu_K+4*sigma_k;
xbot = 0;
xtop = @(a) a;
mu = [mu_U;mu_K];
% Double integral
fun = @(x,u,k) wblpdf(x,u,k).*reshape(mvnpdf([u(:),k(:)],mu(:).',C),size(u));
qfun_scalar = @(x)integral2(@(u,k)fun(x,u,k),ubot,utop,kbot,ktop);
uncpdf = @(x)arrayfun(qfun_scalar,x);
% Tripple integral
qfun_scalar2 = @(a)integral3(@(x,u,k)fun(x,u,k),xbot,xtop,ubot,utop,kbot,ktop);
unccdf = @(a)arrayfun(qfun_scalar2,a);

답변 (1개)

Torsten
Torsten 2015년 3월 16일
syms x xend
a=int(x+5*x^2,0,xend);
Best wishes
Torsten.
  댓글 수: 1
Trond Oesten
Trond Oesten 2015년 3월 16일
편집: Trond Oesten 2015년 3월 16일
Sorry. I was not clear enough in my question. I have updated my question above

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by