Post Reply 
UserRPL HP 50G
07-01-2014, 05:25 PM (This post was last modified: 07-01-2014 05:34 PM by Mikkiz.)
Post: #10
RE: UserRPL HP 50G
Hey,

thanks for the replies!!!

First i have to say, i am new to the HP 50G and new to RPN so sorry for my mistakes. I've tried to program the Simpson Rule like in this video Simpson Rule on Youtube, i just tried to change the input mode that i dont have to write 'F(x)=...' and so on.

i've changed the code abit the most ? are gone, sadly i dont have the code on my pc here due to a pc crash, so i had to remake it again. I've also attached a picture which displays what i want to calculate, if there are some questions.

any1 here programs in Algebraic mode? (i cant find good tutorials >.<)
are there better programs than HpUserEdit?

Thanks in advance

Quote:%%HP: T(0)A(D)F(.);
@ Argumentos:
@ Author:
@ E-mail:
@ Version:
@ Created using HPUserEdit 5 [www.unparche.com]

@ %NAME%=
@ %DIR%=

«

@ Input box, T = Sum


{ {"xf" "Lower Limit"}

{"xd" "Upper Limit"}

{"v" "Reflux Ratio"}

{"a" "Segregation Factor"}

{"n" "Partitions"} }

2 { } { } INFORM

IF 0 == THEN KILL END

OBJ-> DROP



@ Calculate h and store 0 in T, s1, and s2


4 PICK 6 PICK ? 2 PICK / @ that ? confuses me abit

0 DUP DUP



@ Store local variables



-> xf xd v a n h T s1 s2



«



@ Subroutines


« v xi * xd + v 1 + / » 'y' STO

« a xi * 1 xi 1 a - * + / » 'ys' STO

« ys -> NUM y -> NUM ? INV » 'F' STO @ Do i have to change ? with F or with 1






@ Endpoints

xf 'xi' STO F 'T' STO+

xd 'xi' STO F 'T' STO+




@ Inner terms of the Simpson Rule

0 n 2 / 1 ? FOR K

2 K * 1 + h * xf + 'xi' STO

F 's1' STO+ NEXT



0 n 2 / 1 ? FOR K

2 K * h * xf + 'xi' STO

F 's2' STO+ NEXT





@ Calculating the integral

s1 4 * 'T' STO+

s2 2 * 'T' STO+

T h 3 / *





@ Finalizing


v DUP 1 + / * 'T' STO




@ Display T and purge outstanding variables


T 'Result' ->TAG { xi, F, ys, y} PURGE »
»


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
UserRPL HP 50G - Mikkiz - 06-29-2014, 07:01 PM
RE: UserRPL HP 50G - DavidM - 06-29-2014, 09:20 PM
RE: UserRPL HP 50G - Mikkiz - 06-30-2014, 04:00 PM
RE: UserRPL HP 50G - HP67 - 06-30-2014, 04:23 PM
RE: UserRPL HP 50G - DavidM - 06-30-2014, 05:55 PM
RE: UserRPL HP 50G - HP67 - 06-30-2014, 06:31 PM
RE: UserRPL HP 50G - DavidM - 06-30-2014, 06:59 PM
RE: UserRPL HP 50G - HP67 - 07-01-2014, 06:27 AM
RE: UserRPL HP 50G - CosmicTruth - 07-01-2014, 12:26 AM
RE: UserRPL HP 50G - Mikkiz - 07-01-2014 05:25 PM
RE: UserRPL HP 50G - HP67 - 07-01-2014, 05:35 PM
RE: UserRPL HP 50G - DavidM - 07-01-2014, 08:02 PM
RE: UserRPL HP 50G - Mikkiz - 07-02-2014, 07:44 PM
RE: UserRPL HP 50G - HP67 - 07-03-2014, 06:29 AM
RE: UserRPL HP 50G - Joe Horn - 07-03-2014, 08:13 AM
RE: UserRPL HP 50G - Voldemar - 07-03-2014, 11:07 AM
RE: UserRPL HP 50G - HP67 - 07-03-2014, 11:18 AM
RE: UserRPL HP 50G - HP67 - 07-03-2014, 11:15 AM
RE: UserRPL HP 50G - CosmicTruth - 07-04-2014, 12:32 AM
RE: UserRPL HP 50G - Brad Barton - 07-03-2014, 01:57 AM



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