Post Reply 
Hp50 Real Matrix does not allow subst aij real by a'ij complex
03-11-2023, 01:49 PM (This post was last modified: 03-11-2023 01:50 PM by Gil.)
Post: #1
Hp50 Real Matrix does not allow subst aij real by a'ij complex
Suppose that I have a Real Matrix A
[[11 0]
[0 22]].

I want to substitute in a program its
real number 22 by real 220.

Then {2 2} 220 PUT does the job
and I get the matrix B1
[[11 0]
[0 220]].

Suppose instead that I want to substitute
the same real number 22 in matrix A
by the complex number (220,1).
Then {2 2} (220, 1) PUT does not do the job.
Is it normal?

To have the job done, I have apparently
a) to test that number
b) then, if it is complex,
multiply previously A by the complex number (1 0);
then only I can write {2 2} (220, 1) PUT
to get the wished matrix B2:
[[(11, 0) (0,0)]
[(0,0) (22, 1)]].

Is there a simpler way to get the job done?
How do I possibly get the "nicer/simpler" looking matrix B'2:
[11 0]
[0 (220, 1)]] (not having the "0-imaginary" partto appear)?

Note
From complex matrix B2
I can get back A simply by:
[[(11, 0) (0,0)]
[(0,0) (22, 1)]]
{2 2 } 22 PUT.

Thanks for your insight.

Gil
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Hp50 Real Matrix does not allow subst aij real by a'ij complex - Gil - 03-11-2023 01:49 PM



User(s) browsing this thread: 1 Guest(s)