Function pol2xy does not work correctly

Function pol2xy does not work correctly - 消息

#1 已发布: 2012/3/8 17:07:40
olik

olik

3个赞,共27个帖子。

组: User

Hello.

The function pol2xy(r;fi) works only if the Options/Answer is set to Auto, or Standard. And it returns a complex result !!

regards Olik



#2 已发布: 2012/3/12 07:28:19
Radovan Omorjan

Radovan Omorjan

325个赞和1个踩,共2,052个帖子。

组: Moderator

Hello,

The only answer I can give you is that you can ignore the imaginary parts of the results (rather small values).

[MATH=eng]a:asin(3/5)[/MATH]
[MATH=eng]pol2xy(5,a)=sys(4-2.01761263306198*10^{-15}*i,3+3.13994492395312*10^{-15}*i,2,1)[/MATH]
[MATH=eng]Re(pol2xy(5,a))=sys(4,3,2,1)[/MATH]
[MATH=eng]el(Re(pol2xy(5,a)),1)=4[/MATH]
[MATH=eng]el(Re(pol2xy(5,a)),2)=3[/MATH]

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 已发布: 2012/3/12 11:18:03
olik

olik

3个赞,共27个帖子。

组: User

Hello.

Also we can simply use the definition formulas:
x:= r.cos(α)
y:= r.sin(α)

& it works even for Option/Answer set to "Real".
(for Answer=Complex you will get two results for x = -4, 4 ... -4 is imho wrong)
[ we can solve this by using the function eval . . . a:=eval(asin(3/5)) ]

But the funcion pol2xy() does not work correctly - this is the essence of my bug report.

regards Olik

btw:
I do not see the difference betwen the Option Answer = auto/standard
What is the difference?
  • 有新帖
  • 无新帖