These programs use built-in conversion functions to perform these general coordinate transformations
on the equation:
x = r $ cos(✕)
y = r $ sin(✕)
r = ! x
2
+ y
2
✕ = tan
−1
y
x
The transformation equations might not return the results you expect, because the last two equations
do not uniquely define r and .
✕
For example, to find the polar coordinate equation for the straight line y = ax + b, use
c2p(y=a*x+b)
which returns
r =
−b
a$cos(✕)−sin(✕)
To convert the polar equation for a circle with radius = 4 to rectangular coordinates, use
p2c(r=4)
which returns
x
2
− 16 [ 0 and y =− 16 − x
2
or x
2
− 16 [ 0andy= 16 − x
2
This shows a general issue when converting from one coordinate system to the other, which is that
extraneous solutions may be introduced. The only general solution is to check each answer.
(Credit to Alex Astashyn)
[6.16] Transpose operator and dot product find adjoint and complex scalar product
I couldn't have said it better myself:
"Actually, it is worth noting that the transpose operator "T" works as the adjoint (complex conjugate
transposed).
For example, [1,i;1,2i]
T
is [1,1;-i,-2i].
In the same context, the scalar product dotP() works correctly as a complex scalar product. It is linear
in the first argument, antilinear in the second. For example dotP([1,1],[1,i]) is 1-i."
(Credit to fabrizio)
6 - 20