How to do a double integral on a function with 3 variables, so the answer is dependent on the 3 variable
显示 更早的评论
Hi,
I have a function with 3 variables. I want to do a double integral on my function so it's dependent on the last variable. The variables I want to integrate is u and k so my function is dependent on x. I tryed using integral2, but that didn't work. Is it an easy way I can do this?
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;
mu = [mu_U;mu_K];
fun = @(x,u,k) wblpdf(x,u,k)*mvnpdf([u;k],mu,C);
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!