Quadruple Integral Using Nested Integral2 in Matlab

后端 未结 2 848
故里飘歌
故里飘歌 2020-12-11 12:28

I am trying to solve a problem of the following form:

f=@(x,y,z,w) x.*y.*z.*w;          % A complicated black box function
a=1;b=1;c=1;d=1;                           


        
2条回答
  •  感动是毒
    2020-12-11 12:48

    To add to Daniel's answer, I finally broke down and wrote a MATLAB File Exchange submission that does the nesting for you automatically, and it can handle the more tedious cases where the limits are functions rather than constants. It's called integralN, and it is written to handle 4-fold, 5-fold, and 6-fold integrals. I don't think it's a great way of attacking higher-dimensional integration, but if it happens to be fast enough to get the job for you, then it's there to use.

提交回复
热议问题