How do you plot a Midpoint Riemann Sum

function[] = graph_integration_method(fhandle,lo,hi,N)
hold on;
fplot(fhandle,[lo, hi]);
x = linspace(lo,hi,N+1);
dx = diff(x);
for index = 1:N
rectangle('position',[x(index) 0 dx(index) fhandle(index)/2]);
end
end

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Mathematics 的更多信息

产品

版本

R2018b

提问:

2019-3-28

Community Treasure Hunt

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

Start Hunting!

Translated by