array made of an infinite number of elements
Afficher commentaires plus anciens
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)
Réponse acceptée
Plus de réponses (1)
Wayne King
le 4 Déc 2013
Modifié(e) : Wayne King
le 4 Déc 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 commentaire
Walter Roberson
le 4 Déc 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.
Catégories
En savoir plus sur MuPAD dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!