Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15259 > unrolled thread
| Started by | Itai Seggev <itais@wolfram.com> |
|---|---|
| First post | 2013-07-30 03:14 +0000 |
| Last post | 2013-07-31 08:51 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: Incorrect (unexpected) output from TransformedField Itai Seggev <itais@wolfram.com> - 2013-07-30 03:14 +0000
Re: Incorrect (unexpected) output from TransformedField Zdeněk Hurák <hurak@seznam.cz> - 2013-07-31 08:51 +0000
| From | Itai Seggev <itais@wolfram.com> |
|---|---|
| Date | 2013-07-30 03:14 +0000 |
| Subject | Re: Incorrect (unexpected) output from TransformedField |
| Message-ID | <kt7b2b$djq$1@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
[toc] | [next] | [standalone]
| From | Zdeněk Hurák <hurak@seznam.cz> |
|---|---|
| Date | 2013-07-31 08:51 +0000 |
| Message-ID | <ktaj79$lm6$1@smc.vnet.net> |
| In reply to | #15259 |
Itai, thanks for your response. I will go through the Tutorial as you recommend. Of course I read the Help for the TransformedField function before posting here but apparently I did not get it.
Indeed, things are quite confusing to me (as a Mathematica rookie). Of the two calls of TransformedField function
TransformedField["Polar" -> "Cartesian", {r, 0}, {r, \[Theta]} -> {x, y}]
Map[TransformedField["Polar" -> "Cartesian", #, {r, \[Theta]} -> {x, y}] &, {r, 0}]
only the second gives exactly what I had in mind. This is really very confusing to me because the only difference between the two calls is that in the second call, Map is used to apply TransformedField to {r,theta}.
I am afraid that the introduction to Mathematica will take me a while due to all these complexities of the language...
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web