Operation with units xy2pol

Operation with units xy2pol - Poruke

#1 Objavljeno: 5. 6. 2016. 00:07:03
Basile

Basile

8 svidjanja u 172 postova.

Grupa: User

The xy2pol looks that still has problems with units:
smath error 32.JPG
Basile
#2 Objavljeno: 5. 6. 2016. 13:34:47
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Forum xy2pol.gif
#3 Objavljeno: 5. 6. 2016. 13:53:42
Basile

Basile

8 svidjanja u 172 postova.

Grupa: User

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
#4 Objavljeno: 5. 6. 2016. 15:14:46
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

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
#5 Objavljeno: 5. 6. 2016. 17:22:05
Basile

Basile

8 svidjanja u 172 postova.

Grupa: User

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
#6 Objavljeno: 5. 6. 2016. 17:38:16
Mike Kaganski

Mike Kaganski

184 svidjanja u 434 postova.

Grupa: User

@Basile,

Just show what you are trying to describe verbally

scrH53.png

Not that it would convince anyone who doesn't wish, though.
С уважением, Михаил Каганский
1 korisnika je svidelo ovu objavu
Davide Carpi 7. 6. 2016. 17:28:00
#7 Objavljeno: 5. 6. 2016. 17:52:10
Basile

Basile

8 svidjanja u 172 postova.

Grupa: User

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
#8 Objavljeno: 5. 6. 2016. 19:26:10
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

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/help/matlab/ref/atan2.html for example).

Best regards.

Alvaro.
1 korisnika je svidelo ovu objavu
Davide Carpi 5. 6. 2016. 19:28:00
#9 Objavljeno: 5. 6. 2016. 19:55:50
Mike Kaganski

Mike Kaganski

184 svidjanja u 434 postova.

Grupa: User

Wrote

Mike,

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



Yes we do

Citat

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.

Citat

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



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

Citat

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



Russian locale default settings
С уважением, Михаил Каганский
#10 Objavljeno: 5. 6. 2016. 19:57:34
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

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.
#11 Objavljeno: 5. 6. 2016. 20:03:39
Mike Kaganski

Mike Kaganski

184 svidjanja u 434 postova.

Grupa: User

Wrote

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



atan2.sm (35,42 KiB) preuzeto 1331 put(ova).
С уважением, Михаил Каганский
#12 Objavljeno: 5. 6. 2016. 20:58:58
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

Hi Mike. I prefer this other, but have some round inconvenients:

Best regards.

Alvaro.

Fajl nije pronađen.Fajl nije pronađen.
#13 Objavljeno: 5. 6. 2016. 21:04:35
Mike Kaganski

Mike Kaganski

184 svidjanja u 434 postova.

Grupa: User

Wrote

I guess that with the new try function samebody can make a good one atan2.



But with try, it won't differentiate again.
С уважением, Михаил Каганский
#14 Objavljeno: 5. 6. 2016. 21:10:02
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

Wrote

Wrote

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
#15 Objavljeno: 5. 6. 2016. 21:24:33
Mike Kaganski

Mike Kaganski

184 svidjanja u 434 postova.

Grupa: User

It's a good option, and only ~30% slower.
С уважением, Михаил Каганский
#16 Objavljeno: 6. 6. 2016. 10:11:40
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

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 (10,93 KiB) preuzeto 1403 put(ova).
  • Novi postovi
  • Nema novih postova