Programming Question



#19

how do you call a built in function? for example I want to use the function "sloveVx" in a program. Mode is RPN calculator is 49G+
Ex:
<< " Enter a """input obj->
" enter b """input obj->
->a b
<< a b + solvevx>>
>>
input are : a->2x^2+3x=10
b->0 or integer

perhap vice versa:
the outcome should be a sloultion to the equa if b =0 and a= 2x^2+3X=10
I'm not getting the correct solution need some help please


#20

Hello, Harington;

I'm not sure about what sort of result you're getting, but I'd guess a change in your program. Instead of:

 << " Enter a """input obj->    
" enter b """input obj->
->a b
<< a b + solvevx>>
>>
try:
 << " Enter a """input str->    
" enter b """input str->
->a b
<< a b + solvevx>>
>>

The [STR->] is an original HP28/HP48S command that removes the string delimiters ["] that may also be available in the HP49G+ (it is available in the HP48G series). I'm not sure it's gonna solve your problem, but it's worth a try. I'd guess the program evaluates your expression after [OBJ->] instead of simply getting it like an expression. Also, you may have a setting (mode flags) that cause the expression to be automaticaly evaluated after [OBJ->]. If so, changing this set might cause the program to work the way you need.

My assumptions are vague because I have no calcualtor neither any manuals in hands; I'm not home now, but I'd like to post these suggestions.

Sorry not helping the way I'd like to.

Luiz (Brazil)


Edited: 7 May 2004, 6:59 p.m.


#21

do you know which flag that will be ? please post this for me it is taking me too long to figure the solution to this problem . I appreciate this
Harrington(USA)


#22

The input to this problem should be any equa in firt and second oder EX 2x^2+3x=10 or 2x=10 I expect to see the correct sloution to these problem it is taking the input. slotion to these are wrong . that is where I have the problem the operating mode is PRN.


#23

"The input to this problem should be any equa in firt and second oder EX 2x^2+3x=10 or 2x=10 I expect to see the correct sloution to these problem it is taking the input. slotion to these are wrong."

'2*X^2+3*X=10' SOLVEVX will work.
Note that lower and UPPERCASE are different and that you need explicit multiply.
{VPN} AXL


#24

Those are the ans I get when I use the input on stack 1 2 and on 3 for input 2X^2+3=10

on 1 it is just {}
on 2 3=x
on 3 2^x+2

wrong !!!


#25

I don't quite get what you want, 
but I give one more example anyway:
<< "Enter fn of " RCLVX + @ recall the current VX
"
Use =value to complete." +
{ "'" ALG V } @ start with tick in ALG mode and Verify
INPUT STR-> SOLVEVX >>

{VPN} AXL


#26

Hello, Veli-Pekka;

I am curious about your previous post. I have an HP49G, not an HP49G+ (at least so far... 8^), and I saw you used a RCLVX in your last listings. Is it a new implemantation in the HP49G+? I read that the 49G+ O.S. can be used with earlier 94G models, but I didn't give them a try yet, so I don't know if RCLVX is something new (retrieve the expression last used with SOLVEVX ?).

Just that.

Thank you. And thatnk you also for posting a better answer for Harrington's question. I didn't take the "case" into account... q8^(

Luiz (Brazil)


#27

RCLVX and STOVX plus pretty print LIMIT as lim
are all found in the latest 1.9-6 ROM for the old 49G
No need to get the new 49g+
BUT
I still recommend it for the speed
For example switching between pplot modes is faster
CATalog is faster, booting your own STARTUP is faster
Naturally plotting is faster, too.
AND
Then the I/O via USB is 12*faster
plus you have an interface for a SD/MMC card.
The thing also eats up batteries faster...

Nowadays I only use the 49g+ (and the 33s)
[VPN]


#28

In case someone does not want to flash their 49G for the latest ROM you can always program the RCLVX command
Now depending on your ROM you may have either VX directly at HOME or in subdir called CASDIR
<< { HOME VX } RCL >> 'RCLVX' STO
<< { HOME CASDIR VX } RCL >> 'RCLVX' STO
<< PATH SWAP HOME 'VX' STO EVAL >> 'STOVX' STO
<< PATH SWAP HOME CASDIR 'VX' STO EVAL >> 'STOVX' STO
[VPN]
#29

Hey, Veli-Pekka; thanks!

I'm waiting to put my hands in an HP49G+, and after what you wrote I see that I'll have a lot of new things to reason about... BTW: I updated my HP49G to the new(est?) 1.9-6, but I was not aware of these new features. Are they listed somewhere?

In fact, is there any e-doc about the new features since the original O.S. that first came with the HP49G? I saved all "New features list" in the HP site with all updated O.S. I downloaded, but the information is not so "explained", I mean, only a brief description of each new achievement. I don't remember them completely...

If you know (or anyone else knows) where to find it, I'd like to be "told" about... Please?

Tnanks a lot.

Luiz (Brazil)

Edited: 9 May 2004, 7:45 p.m.


#30

Sure there are - one that fits in a single double-sided sheet and another more detailed one in excel format:
http://www.hpcalc.org/details.php?id=3012
http://www.hpcalc.org/details.php?id=5265
I wonder who has gone through all that trouble...(-;
[VPN]

#31

.

#32

Hi, Harington;

Please, follow Veli-Pekka very correct warning about upper case charactes. I see that your input string "Enter a" starts with an upper-case "E" and all of the rest of the program goes lower-case. Maybe you typed it correctly in your calculator, just a concern of mine.

Now, please, change your program so it looks like this one:

 << " Enter a " {"" ALG} INPUT "'" SWAP + OBJ->    
" enter b " {"" ALG} INPUT "'" SWAP + OBJ->
-> a b
<< a b + SOLVEVX>>
>>

The (not elegant) additional

 "'" SWAP +
will make sure that whatever you type in is converted to an equation prior to be stored. If you already typed the expression with a starting ', please remove this sequence. Also,
{"" ALG}
(instead of simply "") activates ALGebraic mode, that's helpfull when entering equations.

I ran it and the program finds the following roots:

{x = -(3+sqrt(89))/4  x = (-3+sqrt(89))/4
Is it what you expect? BTW, mine is an HP49G, not an HP49G+. I'm not sure this is relevant, but if it still does not work, let's try something else.

Let us know.

Success.

Luiz (Brazil)


Edited: 8 May 2004, 10:59 p.m.


#33

Hi, Harington;

I forgot to mention that two flags MAY alter the resulting data format:

flag -3 -> if set, numeric results; if clear, symbolic results

Flag -105 -> if clear, Exact Mode is set and if there are no exact results a null list is returnned.

Hope that's all.

Luiz (Brazil)


#34

lol hp is cool calculator I means it is powerful but sometimes things goes wrong with these mechine.
it i s not working as suppose any suggestion

#35

<< " Enter a """input obj->    
" enter b """input obj->
->a b
<< a b + solvevx>>
>>
================================
try:
<< " Enter a " "" INPUT OBJ-> @ note the BIG LETTERS
" enter b " "" INPUT OBJ-> @ CAPITAL LETTERS
-> a b @ note the blank between -> and a b
<< a b + SOLVEVX >> @
>>

{VPN} AXL


#36

yes it was a very small typo that you and VPN stressed "E" caps wow I watc out for these now I guess


Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple? programming question [WP34S] Shawn Gibson 3 1,500 03-15-2013, 11:56 AM
Last Post: Didier Lachieze
  WP-34S Programming Question Matt Agajanian 2 1,300 08-04-2012, 02:04 PM
Last Post: Matt Agajanian
  WP 34S programming question Nigel J Dowrick 35 8,465 04-10-2012, 02:23 AM
Last Post: Walter B
  15C programming question Eric Zoob 7 2,328 03-28-2012, 03:14 PM
Last Post: C.Ret
  Question about programming the HP-71B Namir 27 6,205 11-28-2010, 01:50 PM
Last Post: Egan Ford
  question on 12c programming Don Shepherd 2 1,206 12-24-2008, 06:33 PM
Last Post: Egan Ford
  17bII programming question Dewdman42 28 6,577 10-07-2008, 11:33 PM
Last Post: Dewdman42
  U Watch programming question.. Geoff Quickfall 12 3,039 06-07-2008, 05:57 PM
Last Post: Geoff Quickfall
  33s - programming question Frank Rottgardt 4 1,598 05-15-2008, 08:27 PM
Last Post: Don Shepherd
  50G Programming question Roger King 5 1,826 12-11-2007, 06:02 PM
Last Post: James M. Prange (Michigan)

Forum Jump: