array made of an infinite number of elements
Mostrar comentarios más antiguos
Hi, the smaller I make t, the more precise the shape of c becomes, but is there a simple way to see what c would look like if t was infinitely small?
t=0.002;
a=(0:t:2)';
b=(-10:0.001:10);
c=sum((sin(bsxfun(@times,b,((pi*2)*a)))),1);
plot(b,c)
Respuesta aceptada
Más respuestas (1)
Wayne King
el 4 de Dic. de 2013
Editada: Wayne King
el 4 de Dic. de 2013
Do you have the Symbolic Toolbox, if so you can determine limits
syms x
limit(sin(x)/x)
to find the limit at a particular value,
syms x
limit(exp(-x^2),inf)
That isn't exactly what you're asking, but other than simply making your increment smaller that's all you can do.
You can also plot symbolically:
syms x;
ezplot(sin(x)/x,[-10 10])
1 comentario
Walter Roberson
el 4 de Dic. de 2013
And to answer the implied other half of the question: there is no way to handle infinity numerically.
For example for sin(x) you can poke around numerically near the upper limits of numeric precision of MATLAB, and you would deduce some particular value for the limit, but in fact limit sin(x) is undefined rather than any particular number.
Categorías
Más información sobre MuPAD en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!