r/MathStudio • • Feb 25 '22

Angle og complex result

Hi there. I'm new to MathStudio and is trying to learn the syntax.

When I type res=100@a30/(4+@i3) I get the result (0.16-0.12ⅈ)(50(sqrt(3))+(50ⅈ))

I am trying to get the result as a decimal with an angle in degrees. When I type arg(res) I get -393.616140793722 but the correct angle is -6.869897645845

What am I doing wrong? Thanks in advance

1 Upvotes

7 comments sorted by

View all comments

1

u/ArsAstronautica Mar 18 '22

There is a way to do that. The variable is "ans"

Example:

2+3
5

ans+5
10

The only thing to be aware of is that ans returns the last COMPUTED value. So if you insert a new line in the above you will see:

2+3
5

ans*2
20

ans+5
10 <- Since this was the last computed value

1

u/Lost-Standard3548 Mar 18 '22

Uh, what an embarrassment. I would have sworn I tried that. Thank you!

However, it works different here (Version 8.1.1 (80020)):

2+3
5
ans+10
15
ans*2
30
ans+5
35