Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Basile  
#1 Posted : 05 June 2016 06:07:03(UTC)
Basile


Rank: Advanced Member

Groups: Registered
Joined: 13/10/2010(UTC)
Posts: 172
Location: USA

Was thanked: 8 time(s) in 7 post(s)
The xy2pol looks that still has problems with units:
smath error 32.JPG
Basile

Edited by moderator 07 June 2016 23:30:43(UTC)  | Reason: marked as bug

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 05 June 2016 19:34:47(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Forum xy2pol.gif
Offline Basile  
#3 Posted : 05 June 2016 19:53:42(UTC)
Basile


Rank: Advanced Member

Groups: Registered
Joined: 13/10/2010(UTC)
Posts: 172
Location: USA

Was thanked: 8 time(s) in 7 post(s)
Jean,

In your example:
The Magnitude (length) and The Angle (angle) in polar coordinates have different units. The rad is not a common unit. It is not correct.

In my example:
Look again please:
smath error 34.JPG

This was solved in recent upgrade by Andrey but apparently remains in the xy2pol.
http://en.smath.info/forum/yaf_postst7552_Units--Operation-cannot-be-performed.aspx

Basile

Edited by user 05 June 2016 19:56:54(UTC)  | Reason: Not specified

Offline Jean Giraud  
#4 Posted : 05 June 2016 21:14:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Better be in harmony wth the maths and Smath.

There is nothing to look gain, Smath is OK.
The Magnitude (length) and The Angle (angle) in polar coordinates have different units.
For sure they have different units: one is in "UnitGraph" the other is in "rad"

The rad is not a common unit. It is not correct.

YES: rad is correct, rad is the maths unit in trig approximations as well as in official tables.
If you want °: convert by appending ° in the Smath result

Forum xy2pol Doing Correct.gif
Offline Basile  
#5 Posted : 05 June 2016 23:22:05(UTC)
Basile


Rank: Advanced Member

Groups: Registered
Joined: 13/10/2010(UTC)
Posts: 172
Location: USA

Was thanked: 8 time(s) in 7 post(s)
Jean,
1.
Please go previously and see the picture.
"rad" is the unit for both the magnitude and angle.
There is ONE placeholder for ONE unit.

The Magnitude (length) and The Angle (angle) in polar coordinates have different units.
For sure they have different units: one is in "UnitGraph" the other is in "rad"

The rad is not a common unit. It is not correct.

YES: rad is correct, [YOU JUST SAID THAT ONE IS LENGTH THE OTHER ANGLE!!!] rad is the maths unit in trig approximations as well as in official tables.
If you want °: convert by appending ° in the Smath result

2.
In this specific set of applications I have no interest in "numerical MathEMATICS". I use units. Thank you.

Basile
Offline mikekaganski  
#6 Posted : 05 June 2016 23:38:16(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
@Basile,

Just show what you are trying to describe verbally Good

scrH53.png

Not that it would convince anyone who doesn't wish, though.
Best regards,
Mike Kaganski
thanks 1 user thanked mikekaganski for this useful post.
on 07/06/2016(UTC)
Offline Basile  
#7 Posted : 05 June 2016 23:52:10(UTC)
Basile


Rank: Advanced Member

Groups: Registered
Joined: 13/10/2010(UTC)
Posts: 172
Location: USA

Was thanked: 8 time(s) in 7 post(s)
Mike,

The xy2pol does not work when units are included:
smath error 34.JPG
Do we agree?

When eventually it is working:
The units of the "Magnitude" and the units of the angle, (for the case of complex numbers here), will be different.

Note: I see you got W(att) how?
I see that you have a semicolon ( ; ) I have a comma (,).
Re(S);Im(S) versus Re(S),Im(S)

Basile
Offline Razonar  
#8 Posted : 06 June 2016 01:26:10(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,368
Uruguay

Was thanked: 828 time(s) in 525 post(s)
Something like that?

z2pol.gif

Notice that atan2 ins't in SMath, which is more correct than atan for this functions (see http://www.mathworks.com...lp/matlab/ref/atan2.html for example).

Best regards.

Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 06/06/2016(UTC)
Offline mikekaganski  
#9 Posted : 06 June 2016 01:55:50(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Basile Go to Quoted Post
Mike,

The xy2pol does not work when units are included:
Do we agree?


Yes we do Good

Quote:
When eventually it is working:
The units of the "Magnitude" and the units of the angle, (for the case of complex numbers here), will be different.


Yes, that's what I show in my screenshot, that uses ≡ instead of =, just to show the desired result: seeing is better than reading.

Quote:
Note: I see you got W(att) how?


Now I suppose it's apparent: Ctrl+= and manually make system with desired result Good

Quote:
I see that you have a semicolon ( ; ) I have a comma (,).
Re(S);Im(S) versus Re(S),Im(S)


Russian locale default settings Good
Best regards,
Mike Kaganski
Offline Jean Giraud  
#10 Posted : 06 June 2016 01:57:34(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
In this specific set of applications I have no interest in "numerical MathEMATICS". [Basile]

From A...Z, Smath is a numerical math tool as any other CAS and including your specific application.
xy2pol result is a vector of two components that need no unit as they are implicit. Extract each
component and append a dead unit decoration for clarity to yourself and the reader.
Offline mikekaganski  
#11 Posted : 06 June 2016 02:03:39(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Razonar Go to Quoted Post
Notice that atan2 ins't in SMath, which is more correct than atan for this functions (see http://www.mathworks.com...lp/matlab/ref/atan2.html for example).


atan2.sm (36kb) downloaded 14 time(s).
Best regards,
Mike Kaganski
Offline Razonar  
#12 Posted : 06 June 2016 02:58:58(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,368
Uruguay

Was thanked: 828 time(s) in 525 post(s)
Hi Mike. I prefer this other, but have some round inconvenients:

Best regards.

Alvaro.

atan2.gif atan2.sm (45kb) downloaded 9 time(s).
Offline mikekaganski  
#13 Posted : 06 June 2016 03:04:35(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Razonar Go to Quoted Post
I guess that with the new try function samebody can make a good one atan2.


But with try, it won't differentiate again.
Best regards,
Mike Kaganski
Offline Razonar  
#14 Posted : 06 June 2016 03:10:02(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,368
Uruguay

Was thanked: 828 time(s) in 525 post(s)
Originally Posted by: mikekaganski Go to Quoted Post
Originally Posted by: Razonar Go to Quoted Post
I guess that with the new try function samebody can make a good one atan2.


But with try, it won't differentiate again.


Oh, I think that this happen only to me :-). Not very sure that try don't accept diff.

So, this with numerical optimization must to be the best solution (until atan2 not be in SMath):

Best regards.

Alvaro.

atan2_2.gif

Edited by user 06 June 2016 03:13:09(UTC)  | Reason: Not specified

Offline mikekaganski  
#15 Posted : 06 June 2016 03:24:33(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
It's a good option, and only ~30% slower.
Best regards,
Mike Kaganski
Offline Jean Giraud  
#16 Posted : 06 June 2016 16:11:40(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Like this Alvaro: look for the Matlb code in the f(x) menu,
look for mwatan2 ... if you have in your version: then go

Jean

Forum atan2 Smath 5346.gif

Maths atan2.sm (11kb) downloaded 11 time(s).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.