array made of an infinite number of elements
이전 댓글 표시
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)
채택된 답변
추가 답변 (1개)
Wayne King
2013년 12월 4일
편집: Wayne King
2013년 12월 4일
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
Walter Roberson
2013년 12월 4일
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.
카테고리
도움말 센터 및 File Exchange에서 MuPAD에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!