Path: news.mathworks.com!not-for-mail
From: "Markus " <bader@acin.tuwien.ac.at>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Undefined function or method 'atan2' for input arguments of type
Date: Thu, 5 Jan 2012 10:55:09 +0000 (UTC)
Organization: TU Wien
Lines: 29
Message-ID: <je3vid$143$1@newscl01ah.mathworks.com>
References: <je3r7k$if3$1@newscl01ah.mathworks.com> <je3t6r$mct$1@speranza.aioe.org>
Reply-To: "Markus " <bader@acin.tuwien.ac.at>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1325760909 1155 172.30.248.46 (5 Jan 2012 10:55:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Jan 2012 10:55:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1398641
Xref: news.mathworks.com comp.soft-sys.matlab:753851

"Nasser M. Abbasi" <nma@12000.org> wrote in message <je3t6r$mct$1@speranza.aioe.org>...
> On 1/5/2012 3:41 AM, Markus wrote:
> > I like to run the following lines of code
> >
> > syms theta alpha x y
> > alpha = atan2(y,x)
> 
> > But I am getting an error on the second line:
> > ??? Undefined function or method 'atan2' for input arguments of type 'sym'.
> > Any Ideas how to solve this problem?
> >
> 
> But x and y are just symbols at the point atan2 is called.
> 
> In other words, they have no numerical values. x and y are just _symbols_
> 
> So, I am just curious what do you expect atan2 (if it works for symbols)
> to do with them in order to return the correct arctan?
> 
> --Nasser

Hi

I just want to evaluate a function later or to build the derivative like I did with:

syms theta alpha x y
alpha = atan(y/x)
subs(alpha, {x y}, {pi/4 pi/4})
theta = diff(alpha,x)