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 |
|||
03-11-2023, 02:21 PM
(This post was last modified: 03-11-2023 02:22 PM by Marco Polo.)
Post: #2
|
|||
|
|||
RE: Hp50 Real Matrix does not allow subst aij real by a'ij complex | |||
03-11-2023, 04:31 PM
Post: #3
|
|||
|
|||
RE: Hp50 Real Matrix does not allow subst aij real by a'ij complex
Nice solution.
But before getting my complex number to be replaced in your suggested form, I have a negative number c, of which I take the nth root. And c n 1/x ^ gives a z of a form (a,b), not directly 'a+bi'. I can't find (any more?) a very simple way (flag setting or command) to transform my (a, b) into your 'a+bi' or to get directly, from c n 1/x ^, the requested form 'a+bi'. |
|||
03-11-2023, 06:20 PM
Post: #4
|
|||
|
|||
RE: Hp50 Real Matrix does not allow subst aij real by a'ij complex
There are three types of arrays used by the HP 49 and 50-
Type 3: real array Type 4: complex array Type 29: symbolic array. Real arrays must contain only real (floating-point) numbers. Complex arrays must contain only complex (floating-point) numbers, e.g. (3., 4.). Therefore, you cannot insert a complex number into a real array. Symbolic arrays may contain any type of number as well as algebraics, but matrix operations are generally slower with symbolic arrays. If you are going to want to insert complex numbers into an array, you should start out with a complex array. You can turn a real array into a complex array with imaginary parts = 0 by DUP SIZE 0 CON R\->C. |
|||
03-11-2023, 08:03 PM
Post: #5
|
|||
|
|||
RE: Hp50 Real Matrix does not allow subst aij real by a'ij complex
"If you are going to want to insert complex numbers into an array, you should start out with a complex array. You can turn a real array into a complex array with imaginary parts = 0 by
DUP SIZE 0 CON R\->C." Easier Real Matrix × (1, 0). How would you call such a Matrix with complex and real numbers and no apparent algebraic expression [[ (5.,6.) (5.,6.) ] [ (7.,9.) 3 ]] ? |
|||
03-11-2023, 10:39 PM
Post: #6
|
|||
|
|||
RE: Hp50 Real Matrix does not allow subst aij real by a'ij complex
(03-11-2023 08:03 PM)Gil Wrote: How would you call such a Matrix It's still a symbolic matrix. If you are in Exact mode and you create a new matrix with exact integers (no decimal points), the result will be a symbolic matrix. Also if you convert a list of lists to a matrix with AXL, it will be a symbolic matrix, even if the list elements are real or complex numbers. Symbolic matrices can be converted into real (or complex) matrices by the command AXM. |
|||
03-12-2023, 12:16 AM
Post: #7
|
|||
|
|||
RE: Hp50 Real Matrix does not allow subst aij real by a'ij complex
I did not know about all those distinctions — and just discovered the existence of AXL & AXM.
Thanks for sharing and explaining. Regards, Gil |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)