How can I make a sigma sum graph?

11 visualizaciones (últimos 30 días)
Han
Han el 3 de Jul. de 2019
Respondida: Jyotsna Talluri el 24 de Jul. de 2019
For example there are following graph for "x" and "q".
fun = @(x) x;
pb = 1:500;
a1 = length(pb);
q = zeros(1,a1);
for a = 1:a1
q(a) = -integral(fun,500,pb(a));
end
I want to replace the integral to a sigma sum for some steps.
I'd like to use a way of adding values as pb is closer to zero.
How can I do?
  1 comentario
Akira Agata
Akira Agata el 4 de Jul. de 2019
You mean, you would like to calculate the following equation for x = 1 ~ 500, and plot the result ?

Iniciar sesión para comentar.

Respuestas (1)

Jyotsna Talluri
Jyotsna Talluri el 24 de Jul. de 2019
Hi,
As the integral and summation are two different functions,we can't get the exact same results with the both.As the lower limit of integration is closer to zero both produce comparable results that don't differ much.For sigma sum you can use symsum function.
syms x;
f=x;
q(a)=symsum(f,x,pb(a),500);

Categorías

Más información sobre Graph and Network Algorithms en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by