Article View: comp.sources.hp48
Article #5v06i012: tbls_mm - Create a table of function values v1.2, Part01/01
From: Mike Morgan
Date: Wed, 29 Jul 1992 01:18
Date: Wed, 29 Jul 1992 01:18
210 lines
6583 bytes
6583 bytes
Checksum: 2556376129 (verify with brik -cv)
Submitted-by: Mike Morgan <m00012@KANGA.STCLOUD.MSUS.EDU>
Posting-number: Volume 6, Issue 12
Archive-name: tbls_mm/part01
BEGIN_DOC tbls.doc
************************
** **
** TBLS V. 1.2 **
** **
** By: Mike Morgan **
** **
************************
This program creates a table of function values.
UFTABLE is the user friendly version. It prompts the user for the required
parameters, which are placed on the stack, and calls TABLE
TABLE is the program that makes the table. It may be used alone, or it may
be called, as UFTABLE does, by other programs. It takes from the stack as
input, for example:
4: '2*X^2'
3: 1
2: 3
1: 6
And returns, using the previous example:
1: [[ 3 18 ]
[ 4 32 ]
[ 5 50 ]
[ 6 72 ]]
Generally, it takes from the stack:
4: function of (upper-case) X
3: partition
2: start value
1: end value
And returns to the stack:
1: [[ Xi f(Xi) ]...
...[ Xn f(Xn) ]...
...[ Xf f(Xf) ]]
The returned matrix can then be viewed in the matrix writer by pushing the
down arrow.
NOTE: If an irrational partition and/or irrational end value are/is used,
the last value desired may not be included in the table. (I wanted
to keep this program as small as possible.) You may easily
compensate for this by using an end value which is slightly greater
than that which is actually deisired when using an irrational
partition.
NOTE: TABLE can be run without UFTABLE.
Anyway, I have found this program EXTREMELY helpful for labs in my physics
and introductory circuit analysis courses.
If the directory is stored as TBLS, you'll get:
checksum: # 13440d
bytes: 545
Mike Morgan, Student at St. Cloud State University
M00012@KANGA.STCLOUD.MSUS.EDU
mmorgan@solar.stcloud.msus.edu
428 7th Ave. S.
St. Cloud, MN 56301
(612) 654-6010
P.S. Feel free to change the program (the INPUT prompts, for instance--
or delete ABOUT to conserve memory) as you desire. As soon as I
learn system RPL, I will rewrite TABLE to see if I can make it even
quicker than it already is. (It is reasonably quick.)
END_DOC
BEGIN_RPL tbls.rpl
%%HP: T(3)A(D)F(.);
DIR
UFTABLE@User friendly table, i.e., prompts user for input.
\<<
" Function (of X)"
{ { 1 2 } ALG "''" V } INPUT
OBJ\->
" \GDX"
{ "" V } INPUT
OBJ\->
" X min"
{ "" V } INPUT
OBJ\->
" X max"
{ "" V } INPUT
OBJ\->
TABLE
\>>
@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
@
@ Program: TABLE
@ Programmer: Mike Morgan
@ Date: May 29, 1992
@
@ takes from stack:
@ 4: function of X
@ 3: increment
@ 2: Xi
@ 1: Xf
@
@ Places on stack
@ 1: [ [ Xi f(Xi)]...
@ ...[ Xn f(Xn)]...
@ ...[ Xf f(Xf)] ]
@
@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
TABLE
\<<
0
\-> p n x c
\<<
'F(X)'
SWAP
=
DEFINE
n x
FOR n
n n
F
1
'c' STO+
p STEP
c
2
2
\->LIST
\->ARRY
\>>
'F' PURGE
\>>
About @Only final user may delete the following to save on memory.
\<<
CLLCD
" Tables" 1 DISP
" Version 1.2" 2 DISP
"(Creates a table of" 3 DISP
"function values)" 4 DISP
"Another program by..." 6 DISP
"Mike Morgan, SCSU" 7 DISP
7 FREEZE
\>>
END
END_RPL
BEGIN_ASC tbls.asc
%%HP: T(3)A(D)F(.);
"69A20FF7FB20000000501426F6574750D9D20E1632858A1C2A20F10000202020
2020202451626C656379C2A2485A1C2A20720000202020202026556273796F6E
60213E223ED2A2485A1C2A20B20008234275616475637021602471626C65602F
6663F2A2485A1C2A20520006657E6364796F6E6026716C657563792803A2485A
1C2A20F200014E6F647865627020727F6762716D6022697E2E2E2233A2485A1C
2A2072000D496B65602D4F6277616E6C20235343555743A2485A1743A24A5A19
3632B21307710050451424C45450D9D20E16324B2A21C432D6E201007D6E2010
E6D6E201087D6E201036E16328BA2084E2010858BA2084E201064B21309FF300
46F1B2130DBBF18D8A156D02D6E2010E6D6E2010870A132D6E2010E6D6E2010E
6D6E2010E684E2010649C2A245632D6E20103697632B4402D6E20100708332D6
E201036ED2A2ED2A2387C1900D1EF5324563284E20106497632EFE0293632B21
3043100705564451424C45470D9D20E1632C2A207200002026457E6364796F6E
60282F66602859247A2047A209C2A2ED2A2B213084E203014C474C2A20900007
27284E201065B2130AC422B7FC1C2A20D00000202B98547A20C2A205000084E2
01065B2130AC422B7FC1C2A203100002028502D696E647A20C2A205000084E20
1065B2130AC422B7FC1C2A203100002028502D6168747A20C2A205000084E201
065B2130AC422B7FC184E2050451424C45493632B21300843"
END_ASC
BYTES: 3480h 534.5
BEGIN_UU tbls.uue
begin 644 tbls
M2%!(4#0X+466*O!_OP(````%06)O=70%G2W@82-8J,&B`A\```("`@("`D(5
M)L96-I<L*H2EP:(")P```@("`@)B528WE_;F!A+C(N,M*H2EP:("*P"`,B17
M%D97-@<2!D(7)L96!O)F-B\JA*7!H@(E`&!6YS9&E_;F!F(7QE97-I>","J$
MI<&B`B\`$.3V1H=6)@<")_=V)A?6!B*6Y^+B(C,JA*7!H@(G`-"4ME8&TO0F
M=Q;FQ@(R-315=30JA*5Q-"JDI9%C(RLQ<!<`!51!0DQ%!9TMX&$CM*(23"-M
M+A``U^8"`6YM+A"`U^8"`6,>-H*K`D@N$("%JP)(+A!@M!(#^3\`9!\K,="[
M']BH4=8@;2X0X-;F`@%XH#'2Y@(!;FTN$.#6Y@(!;D@N$&"4+"I4-M+F`@%C
M>3:R1"!M+A``!S@C;2X0,.8M*MZB,G@<"=#A7R-4-H+D`@%&>3;B[R`Y-K(2
M`S0!<%!E1!4DQ%1TT-D"'C;"H@(G```"8E3G-D:7]N8&@O)F!H*50J<"="J0
M+"K>HK(2`T@N,!#$=,2B`@D`<'*"Y`(!5BLQH$PB>\_!H@(-```"LHE%IP(L
M*E```$@N$&"U$@/*)++W'"PJ,`$`("!8(&UI;G0JP*("!0"`Y`(!5BLQH$PB
M>\_!H@(3```"@@72%H9'IP(L*E```$@N$&"U$@/*)++W'$@N4$`5),14E&,C
#*S$`
`
end
sum -r/size 16555/771 section (from "begin" to "end")
sum -r/size 37019/543 entire input file
END_UU
Technical Details
Message-ID:
<1992Jul29.011844.22826@seq.uncwil.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!seq!spellShow Full Headers
Complete Article Headers
Newsgroups: comp.sources.hp48 Path: arc1-ca.pugleaf.net!sparky!uunet!seq!spell From: Mike Morgan <m00012@KANGA.STCLOUD.MSUS.EDU> Subject: v06i012: tbls_mm - Create a table of function values v1.2, Part01/01 Message-ID: <1992Jul29.011844.22826@seq.uncwil.edu> Followup-To: comp.sys.hp48 Sender: spell@seq.uncwil.edu (Chris Spell) Organization: Univ. of North Carolina @ Wilmington Date: Wed, 29 Jul 1992 01:18:44 GMT Approved: spell@seq.uncwil.edu Lines: 214