【发布时间】: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
还有谁知道最接近积分的最佳增量是多少? 我很感激任何建议!
【问题讨论】:
-
你可能会觉得这很有帮助stackoverflow.com/questions/19696212/…
-
旁注:你应该真正矢量化你的代码。
-
当然感谢@Memming
标签: matlab integration