I was trying to input a complex number in this form:
(123, (angle)30)
where (angle) is 'ALPHA+Right+6' and it works allright.
But when I try to use a variable I always get 'Invalid Syntax'.
How can I use variables for the absolute value and the argument of a
complex number?
Best regards
Artur
You can't [at least not vector mode with angle]
BUT algebraic
'X+Y*i' will show as (X,Y)
if you clear the flag
-27 CF
or "uncheck"
[MODE] |FLAGS|
_ 27 'X+Yxi' -> '(X,Y)'
otherwise:
happy 1st of April!
You can do that if you don't mind some algebraic goings-on.
Uncheck flag 27, select polar mode, and put single quotes around
the round brackets to make it an expression and it works like
this, where <) is the angle symbol:
'(X,<)Y)' ENTER -> (X*COS(Y), X*SIN(Y))
Now if you store 3 as 'X' and 4 as 'Y' and press EVAL, it
displays (3.0000, <)4.0000).
The single quotes are still there but don't appear on the stack.
I used FIX 4 to prevent a whole bunch of nines. :-)
Bill
> A complex number in this form: (123, (angle)30) works
> But when I try to use a variable I always get 'Invalid Syntax'
That's because it is invalid syntax :)
"Complex number" objects can contain only two _real_number_ components;
it has always been this way in all HP48/49/50.
Variables can be present only within symbolic _expressions_ (formulas),
or within symbolic arrays on 49/50 series only,
since, in UserRPL, even arrays had to be numeric on the HP48 series.
> How can I use variables for the absolute value and the argument
> of a complex number?
As has already been noted, the syntax '( R, \<)t )'
can be used to generate the symbolic expression
'R*COS(t)+R*SIN(t)*i'
This is not a complex "number"; it is a symbolic _expression_
Note that if you perform RE (real part) and IM (imaginary part)
on that expression, you get, respectively:
'COS(t)*RE(R)-SIN(t)*IM(R)' @ real part
'COS(t)*IM(R)+SIN(t)*RE(R)' @ imaginary part
This (correctly) takes into consideration
the fact that even 'R' could be complex-valued,
('t' happened to be in my 'REALASSUME' list in CASDIR,
so it was assumed above to be real-valued).
More generally, with 't' removed from 'REALASSUME'
these would be much more complicated expressions,
just as would be ABS and ARG of the above symbolic,
not necessarily producing 'R' and 't' at all,
revealing why it does not actually make much sense
to try think in general terms of "absolute value"
and "argument" when variable names replace numbers,
in the same simple way as we can for complex _numbers_
which in turn is why no attempt is made to either
accept complex _numbers_ symbolically,
nor to decompile (display) complex-valued _expressions_
into "polar" form.
--
"John H Meyers" <jhme...@nomail.invalid> kirjoitti
viestissä:op.urp8p...@miu.edu...
Thankyou very much.
I allways forget about the trignometric expression.
greetings
I allways forget about the trignometric expression.
Artur