How to do a double integral on a function with 3 variables, so the answer is dependent on the 3 variable
Mostrar comentarios más antiguos
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);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Numerical Integration and Differentiation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!