Re: Incorrect (unexpected) output from TransformedField
- To: mathgroup at smc.vnet.net
- Subject: [mg131462] Re: Incorrect (unexpected) output from TransformedField
- From: Itai Seggev <itais at wolfram.com>
- Date: Mon, 29 Jul 2013 23:20:27 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
On Tuesday, July 23, 2013 4:16:40 PM UTC-5, ZdenÄ?k Hurák wrote: > Hello, > > > > I seem to have troubles to understand the correct usage of TransformedField function (in version 9). Or the function contains a bug :-) Here goes a simple code with the source of my confusion > > > > =================================================== > > In[22]:= TransformedField[ > > "Polar" -> "Cartesian", {r, 0}, {r, \[Theta]} -> {x, y}] > > > > Out[22]= {x, y} > > =================================================== > > > > What I would expect as the cartesian description of a vector field originally given in polar coordinates as {r,theta} is {Abs[x],0}. Have I missed anything here? Thanks. Hi Zdenek. The output is correct. I would encourage you read the tutorial, which you can do by typing tutorial/ChangingCoordinateSystems into the Documentation Center. Briefly, this input is interpreted as "change the vector field r e_r + 0 e_theta to Cartesian coordinates (x,y), which gives the radial vector field x e_x + y e_y". The tutorial explains seveal other operations you can perform; perhaps this one is what you had in mind? In[1]:= Map[ TransformedField["Polar" -> "Cartesian", #, {r, \[Theta]} -> {x, y}] &, {r, 0} ] Out[1]= {Sqrt[x^2 + y^2], 0} I hope this helps. -- Itai Seggev Mathematica Algorithms R&D 217-398-0700