Post Reply 
Converting
02-05-2015, 06:52 AM
Post: #21
RE: Converting
(02-04-2015 07:15 AM)retoa Wrote:  
(02-04-2015 12:34 AM)Joe Horn Wrote:  Textbook Display mode (Home Settings, page 2) and CAS don't always play well together. I usually leave it turned off.

I changed to Algebraic Display mode but still have the same error when I use the convert command from the units menu and all the parenthesis when I use the sto button (in CAS).

There seems to have been a misunderstanding here. Please note that I was referring to Textbook DISPLAY mode (Home Settings, page 2), not Textbook ENTRY mode (Home Settings, page 1). And there's no such thing as Algebraic Display mode.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
02-05-2015, 07:25 AM
Post: #22
RE: Converting
(02-05-2015 06:52 AM)Joe Horn Wrote:  
(02-04-2015 07:15 AM)retoa Wrote:  I changed to Algebraic Display mode but still have the same error when I use the convert command from the units menu and all the parenthesis when I use the sto button (in CAS).

There seems to have been a misunderstanding here. Please note that I was referring to Textbook DISPLAY mode (Home Settings, page 2), not Textbook ENTRY mode (Home Settings, page 1). And there's no such thing as Algebraic Display mode.

You are right Joe !!!!!
I did effectivly change the input mode, not the diplay (did not notice the checkbox). If I change the display mode it works fine !

Thank you very much for the answer, that was very helpfull !!!

reto
Find all posts by this user
Quote this message in a reply
02-05-2015, 09:18 AM (This post was last modified: 02-05-2015 09:18 AM by Angus.)
Post: #23
RE: Converting
Han, you have indeed good ideas! Thank you for the inspiration. You don't work at HP yet, don't you?

I still bewail that there is no way of 'executing' a return-value. If I could send a returned command to the parser(s) many things that slow down work could be solved. Key bindings in RPN could get an RPN feel (plus saving keystrokes) and so on...
Thanks again for your passion and my wish is that the prime will evolve to a more and more logical and productive device. However based on its built in ressources, of course. I suspect that HP won't put too much efford into that. The so called "dissociative identity disorder" e.g. has to be taken as-is forever, I think.
Find all posts by this user
Quote this message in a reply
02-05-2015, 10:41 AM
Post: #24
RE: Converting
(02-04-2015 06:56 PM)ndzied1 Wrote:  My real world example.

Convert 50 liters to galUS then convert 75 liters to galUS

50g required steps (12):
  1. R-Shift
  2. Units
  3. Vol (F4)
  4. NXT
  5. 50
  6. l (F1)
  7. L-Shift
  8. gal (F4)
  9. 75
  10. l (F1)
  11. L-Shift
  12. gal (F4)


Prime required steps (24):
  1. 50
  2. Shift
  3. Units
  4. Volume (4)
  5. l (touch)
  6. Sto> (touch)
  7. Shift
  8. Units
  9. Volume (4)
  10. swipe up
  11. galUS (touch)
  12. Enter
  13. 75
  14. Shift
  15. Units
  16. Volume (4)
  17. l (touch)
  18. Sto> (touch)
  19. Shift
  20. Units
  21. Volume (4)
  22. swipe up
  23. galUS (touch)
  24. Enter


And the more conversions I have to do, the worse the Prime is because I always have to keep bringing back the unit menu and hitting Enter. :-(

I would do:

[50,75]_l sto> _galUS

the answer will be [10.21,19.81]_galUS. If you have more than two values just do a bigger vector.

If you really have to convert very often from liter to Gallons you can also use the spreadseet app. Unit conversion works also in the spreadsheet, so you use column A for liters, store GalUS conversion in B, save the app with a new name and each time you have to convert lots of values you just call the new app and insert the liter values in column A. Column be will give you the values in GalUS.

reto
Find all posts by this user
Quote this message in a reply
02-05-2015, 07:06 PM
Post: #25
RE: Converting
(02-05-2015 09:18 AM)Angus Wrote:  I still bewail that there is no way of 'executing' a return-value. If I could send a returned command to the parser(s) many things that slow down work could be solved. Key bindings in RPN could get an RPN feel (plus saving keystrokes) and so on...

Can you not do that with return(30) ? That is, create your program that you wish to use as a key replacement, and instead using return("command"), just add command() to your program and use return(30) -- which is the enter key. Perhaps I am misunderstanding your post.

Separately...

Minor changes to "about 10 keystrokes for unit conversion" code:

In the previous version, escaping from the menus (with user keys enabled) would not produce an underscore. The tiny modification now creates an uderscore with no units should users want... an underscore with no units :-)

Code:
lastunit:={0,0};

KEY KS_Space()
BEGIN
  local list1:={"Length", "Volume"};
  local list2:={{"m","cm","in"},{"m^3","cm^3","in^3"}};
  local c1,c2;
  if lastunit(1) OR lastunit(2) then
    c1:=lastunit(1); c2:=lastunit(2);
    choose(c2,list1(c1),list2(c1));
  else
    c1:=0; c2:=0;
  end;

  if c2==0 then
    repeat
      choose(c1,"Units",list1);
      if c1 then
        choose(c2,list1(c1),list2(c1));
      end;
    until c1==0 OR c2;
    lastunit:={c1,c2};
  end;

  if c2 then return("_"+list2(c1,c2)); else return("_"); end;
END;

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-05-2015, 07:13 PM
Post: #26
RE: Converting
There is no way I'm typing a unit name with lower and upper case letters every time I want to do a conversion.

However, the spreadsheet idea is very interesting. I will give that a try.

And when I get time I'll play with HAN's program.

Then my next quest will be getting them to add units to equations and to implement a multiple equation solver like the 50g :-)
Find all posts by this user
Quote this message in a reply
02-05-2015, 07:23 PM
Post: #27
RE: Converting
(02-05-2015 07:13 PM)ndzied1 Wrote:  and to implement a multiple equation solver like the 50g :-)
I think the Prime already has that built-in!?
Find all posts by this user
Quote this message in a reply
02-05-2015, 07:49 PM (This post was last modified: 02-05-2015 07:49 PM by retoa.)
Post: #28
RE: Converting
(02-05-2015 07:23 PM)Offroad Wrote:  
(02-05-2015 07:13 PM)ndzied1 Wrote:  and to implement a multiple equation solver like the 50g :-)
I think the Prime already has that built-in!?

In the Solver app you can introduce up to 10 equations, you check the ones you want to use and in num view you check the variables you are searching for (as many as there are equations) and introduce starting values, you introduce the values for the known variables (if you have more variables then equations) and click solve.

It works very well. If there is a set of equations you use often you can save the application with a new name. I saved one for the dynamics equations, one for Bernoulli, ...

It is worth giving it a try

reto
Find all posts by this user
Quote this message in a reply
02-05-2015, 08:29 PM
Post: #29
RE: Converting
(02-05-2015 07:49 PM)retoa Wrote:  
(02-05-2015 07:23 PM)Offroad Wrote:  I think the Prime already has that built-in!?

In the Solver app you can introduce up to 10 equations, you check the ones you want to use and in num view you check the variables you are searching for (as many as there are equations) and introduce starting values, you introduce the values for the known variables (if you have more variables then equations) and click solve.

It works very well. If there is a set of equations you use often you can save the application with a new name. I saved one for the dynamics equations, one for Bernoulli, ...

It is worth giving it a try

reto

I meant to say multiple equations WITH UNITS :-)
Find all posts by this user
Quote this message in a reply
02-05-2015, 08:57 PM
Post: #30
RE: Converting
(02-05-2015 07:49 PM)retoa Wrote:  In the Solver app you can introduce up to 10 equations

This limitation alone should be sufficient reason to warrant a new solver :-)

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-06-2015, 04:30 PM
Post: #31
RE: Converting
(02-04-2015 07:31 PM)Han Wrote:  Make a customized key that brings up a full choose-menu...

As usual, great problem-solving code snippets from Han, but it wouldn't be complete without a 50g solution too.
Here's what I use on the 50g:

Code:

{ { "l" { << 1_l * >> << 1_l CONVERT >> } } { "gal" { << 1_gal * >> << 1_gal CONVERT >> } }
'CST' STO

It's a simple custom menu, in which using the unit unshifted will apply the unit to a number, while using it with the white shift will convert the number on the stack to that unit.

So the example of the 50 liters to galons would be:

1. Press CST
2. 50
3. Press l [F1]
4. Press Shift-[F2] (shift-gal)
5. 75
6. Press l [F1]
7. Press Shift-[F2] (shift-gal)

Of course it can be extended with as many units as you want.

Claudio
Find all posts by this user
Quote this message in a reply
03-13-2015, 03:19 AM
Post: #32
Cannot get fahrenheit in denominator
Can anyone tell me how to generate the following units: BTU/lbs-F

I can get BTU/lbs, but when I try to divide by F (Fahrenheit) I get an error. I am working in home mode.

Please help. Thanks.

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




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