HP50g  Define functions with matrices inside

05312024, 12:50 AM
Post: #1




HP50g  Define functions with matrices inside
Just buy a HP50g, so i'm still a newbie here.
I need to define some functions with matrices inside, but it seem impossible. An example: DEFINE(A(M,R)=M*[[COS(R),1][1,COS(R)]]) or anything that contains a matrix inside, like: DEFINE(A(B)=B*[[1,1][1,1]]) I'm writing the matrices with matrix writer. Algebric mode The "define" works well with every operation so far, but when I try to put any matrix inside, it shows "Bad argument type" error. Thanks and sorry for the newbie question! 

05312024, 02:52 PM
Post: #2




RE: HP50g  Define functions with matrices inside
I couldn't make it work in ALGmode either but I have to say I'm not used to ALGmode.
But it's rather easy to create a small RPNprogram that takes two arguments (M and R) from the stack and does what you want. Not sure how to program that in ALGMode though. Program listing in RPN \<< \> M R \<< [[ 'COS(R)' 1 ][ 1 'COS(R)' ]] M * \>NUM \>> \>> 'A' STO // store the program in A How to use it in RPNmode: 1.5 // M 30.0 // R [A] // with softmenu, press [VAR] and [NXT] till you see [A] Output: [[ 1.2990 1.5000 ][ 1.5000 1.2990]] But once created it will work in ALGmode as well: '>NUM(A(1.5,30.0))' // >NUM from the cat menu HTH Roman 

« Next Oldest  Next Newest »

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