Lists represent columns of the matrix, Lists represent columns of the matrix ,10-15 – HP 50g Graphing Calculator User Manual

Page 316

Advertising
background image

Page 10-15

entered in the display as you perform those keystrokes. First, we present the
steps necessary to produce program CRMC.

Lists represent columns of the matrix

The program

@CRMC allows you to put together a p×n matrix (i.e., p rows, n

columns) out of n lists of p elements each. To create the program enter the
following keystrokes:

Keystroke sequence:

Produces:

‚ å

«

„°

@)STACK! @@DUP@

DUP

‚ é # ~ „n

n

‚ å

<<

1„°

@)STACK! @SWAP

1 SWAP

„°

@)BRCH! @)FOR@! @FOR@

FOR

~„j

j

„°

@)TYPE OBJ

OBJ

ARRY@

ARRY

„°

@)BRCH! @)@IF@@ @@IF@@

IF

~ „j#

j

~ „n

n

„°

@)TEST! @@@<@@@

<

„°

@)BRCH! @)@IF@ @THEN

THEN

~ „j #1+

j 1 +

„°

@)STACK!

L

@ROLL

ROLL

„°

@)BRCH! @)@IF@ @END

END

„°

@)BRCH! @)FOR@! @NEXT

NEXT

„°

@)BRCH! @)@IF@ @@IF@@

IF

~ „n #1

n 1

„°

@)TEST! @@@>@@@

>

„°

@)BRCH! @@IF@ @THEN

THEN

1#

1

~ „n #1-

n 1 -

„°

@)BRCH! @)FOR@! @FOR@

FOR

~ „j #

j

~ „j #1+

j 1 +

„°

@)STACK!

L

@ROLL!

ROLL

„°

@)BRCH! @)FOR@! @NEXT!

NEXT

„°

@)BRCH! )@@IF@! @END@

END

Advertising