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

Respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Productos

Versión

R2018b

Preguntada:

el 28 de Mzo. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by