Sum of near infinite series?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Having some trouble figuring out where to start with this problem:
Find the product of the first n (n=9999) terms of the following expression where n is an integer variable greater than one:
eq = 2/1 * 2/3 * 4/3 * 4/5 * 6/5 * 6/7 * 8/7 * 8/9 .... *n-1/n
Any help on figuring this out would be appreciated.
0 comentarios
Respuestas (2)
David Hill
el 22 de Oct. de 2019
p=[];
for i=1:2:n+1
p=[p,(n+1)/n,(n+1)/(n+2)];
end
P=prod(p(1:n));
2 comentarios
David Hill
el 22 de Oct. de 2019
a=2*[1:floor((n+1)/2);1:floor((n+1)/2)];
nu=a(:)';
d=[1,nu-1];
p=prod(nu(1:n)/d(1:n));
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!