Matlab: Limit as t approaches positive and negative infinity?
<p>I'm trying to write some code which would find the limit of a function as x approaches positive and negative infinity. The code I have so far is as follows:</p>

<pre><code>pos = limit(exp(atan(x)), x = infinity)
neg = limit(exp(atan(x)), x = -infinity)
</code></pre>

<p>However, it gives me an error saying "invalid syntax at =. Possibly, a ), }, or ] is missing. When I looked at the Matlab documentation for how to compute a limit, they had this as their example:</p>

<pre><code>limit((1 + 1/n)^n, n = infinity)
</code></pre>

<p>and this returned an answer of e. When I put this into my own Matlab, it gave me the same error, could anyone help? Is it possibly an error with my Matlab?</p>