cancel
Showing results for
Did you mean:
Level 4
138 92 2 5
Message 1 of 5
405
Flag Post

# [HP 50g] Is there some library which helps me to convert matrix from dms to decimal values

HP Recommended
HP 50g graphing calculator

Hi dear HP Community,

I want to know does anyone knows if there exist any library ( for HP 50g graphing calculator ) which will help me to convert values in matrix from dms (degrees.minutesminutessecondsseconds) to decimal format but still able calculate with those matrix.

Is there any, maybe built in function how to do that?

Thanks for any good answer and help, for forward 🙂😊

Tags (1)
4 REPLIES 4
Level 8
635 622 121 213
Message 2 of 5
Flag Post
HP Recommended

There might be a shorter way, but this sequence of commands works.  With the matrix on the stack, do this:

« HMS→ » MAP

The MAP command causes the « HMS→ » program on level 1 to be applied to all the elements in your matrix on level 2.

Hope that helps!

Disclaimer: I don't work for HP. I'm just another happy HP calculator user.

-Joe-
Level 4
138 92 2 5
Message 3 of 5
Flag Post
HP Recommended

Hi dear Joe,

This is really cool !! , Do you maybe know how to make this function work in Algebraic calculator mode?

Here is what i do with this, suppose that i  have matrix of angles written in HH.MMSS format, and i need to convert to decimal format.

My input data and "code" below:

here is my input data

And yeah, only thing that bothered me, personally is this message (shown below) :

Of course I choose "YES". Do you maybe know how to avoid such message, instead of being in "Radian mode".

Despite that, i got correct results:

Final Results

It works in reversed direction too when I used function like  →HMS for converting from decimal to hh.mmss format , while being in "Radians mode" i came to this ...

reversed direction...

and when hit enter...

This is what happen when I hit enter on keyboard

So that is quite correct. Thank you Joe for participation !! 😃 If you know how to do this in Algebraic mode please tell me how if possible 🤔 , of course.

Have a nice day 😎

Bye 👋

Level 8
635 622 121 213
Message 4 of 5
Flag Post
HP Recommended

To avoid annoying prompts that ask whether you want to change mode, press MODE FLAGS up-cursor, and then set flag -120 and clear flag -123.  As you can see, that puts your HP 50g into "Allow Silent Switch" mode, which silently changes modes whenever needed without asking or beeping.

As for how to do things in algebraic mode, I have no idea, since I only use the 50g in RPN mode.

-Joe-
Level 4
138 92 2 5
Message 5 of 5
Flag Post
HP Recommended

Hi, Joe again,

Thank you for sharing your solution with me... It's actually great, no annoying messages so far.

This is how i done that, what you write in the post.

1.  Go to Flags settings, then  set flag -120 and clear flag -123.

Flags setting

2.nd - Then i wrote "my code" ...

"My code"

3. Show a result...

here is my result

NOTE! - Only, I thought  that you could totally avoid changing modes, especial from degrees to radians when using MAP because  I can do a mistake, especially when, later maybe, I forget to change angle mode back to degrees while doing calculation(s) with degrees.

What is also nice, and i did not know that, so far... that  you can also do quite sort of things when using MAP , especially with using user defined function.

Let's suppose that I have this code:

Written code

This program basically use a number from the stack and gives you a same number squared as result.

That's what should this program perform when using a single number from stack.

Let's suppose that I gave this program a name and call them "sqa" (  squared )

When i write in calculator this:

<< sqa >> MAP code

When press a ENTER key i got all number in matrix squared... that's so nice and cool about this function.

squared numbers as result of using sqa user defined function

Thank you Joe for sharing this knowledge to me, I appreciate that 😃😃

Thanks and bye bye 👋

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation