4D integration numerical evaluation
显示 更早的评论
Hi
I am trying to numerically evaluate a 4D integral of the form:
\int\int\int\int K(x,y,t,s)h_m(x)h_n(y)h_p(t)h_q(s)dxdydtds, limits of integral is 0 to 1.
where h is a function of single variable.
thanks
1 个评论
Star Strider
2015-2-12
See the documentation for integral. Depending on your version of MATLAB, you may need to search for the correct function. In previous versions, the quad function and its friends did numerical integration of functions.
You will need to iterate your integration four times, once for each variable.
Another option is trapz if you have already evaluated your function over a 4D grid and you want to use trapezoidal integration. You will have to integrate it over each dimension, so four times for it as well.
采纳的回答
更多回答(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!