How to integrate a bivariate function over 1 dimension?

I have a bivariate normal pdf that I wold like to integrate over only 1 dimension. Does anyone have advice on how to do this? Thank you!

2 件のコメント

Walter Roberson
Walter Roberson 2019 年 4 月 27 日
Use the Symbolic Toolbox?
jlr
jlr 2019 年 4 月 27 日
Thanks, Walter. I've never used it. Is it fairly easy to use?

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2019 年 4 月 27 日

0 投票

syms x y rho ux uy real
syms sx sx positive
syms pi
assume(-1 <= rho & rho <= 1)
f = 1/(2*pi*sx*sy*sqrt(1-rho^2)) * exp(-1/(2*(1-rho^2))*((x-ux)^2/sx^2 + (y-uy)^2/sy^2 - 2*rho*(x-ux)*(y-uy)/(sx*sy)))
pretty(f)
result = int(f,x,-inf,inf)

その他の回答 (0 件)

質問済み:

jlr
2019 年 4 月 27 日

コメント済み:

jlr
2019 年 4 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by