【问题标题】:Approximating a double integral in MATLAB by double summation通过双求和逼近 MATLAB 中的双积分
【发布时间】:2014-10-30 00:18:34
【问题描述】:

我正在尝试通过使用双和的概念使用 MATLAB 在数值上逼近一个双积分。假设我要集成的功能超过 x 和 y 我可以执行以下操作,

result=0;
for i=1:0.1:x
for j=1:0.1:y
fun(i,j)= x(i).*y(j)*0.1^2; %the function I want to integrate times the increment
result = result + fun(i,j);
end
end

还有谁知道最接近积分的最佳增量是多少? 我很感激任何建议!

【问题讨论】:

标签: matlab integration


【解决方案1】:

数值积分是一个相当复杂的课题。可能,最好的标准选项是使用 (http://www.mathworks.nl/help/matlab/ref/integral2.html#btdgcqq)

result = integral2(fun,xmin,xmax,ymin,ymax)

如果您对一般的数值积分感兴趣,请查看 Wiki (http://en.wikipedia.org/wiki/Numerical_integration)。对于具体的实现,Numerical Recipes 是一个很好的参考点(http://www.it.uom.gr/teaching/linearalgebra/NumericalRecipiesInC/,对不起,那里没有 Matlab 版本)

【讨论】:

    猜你喜欢
    • 2018-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-21
    • 1970-01-01
    • 2013-01-19
    • 1970-01-01
    相关资源
    最近更新 更多