Function ranm, Function sub, Function ranm ,10-11 function sub ,10-11 – HP 50g Graphing Calculator User Manual

Page 312

Advertising
background image

Page 10-11

If using RPN mode, we assume that the matrix is in the stack and use

{6} `

RDM.

Function RANM

Function RANM (RANdom Matrix) will generate a matrix with random integer
elements given a list with the number of rows and columns (i.e., the dimensions
of the matrix). For example, in ALG mode, two different 2

×3 matrices with

random elements are produced by using the same command, namely,
R NM({2,3}) :

In RPN mode, use {2,3}

` R NM.

Obviously, the results you will get in your calculator will most certainly be
different than those shown above. The random numbers generated are integer
numbers uniformly distributed in the range [-10,10], i.e., each one of those 21
numbers has the same probability of being selected. Function RANM is useful
for generating matrices of any size to illustrate matrix operations, or the
application of matrix functions.

Function SUB

Function SUB extracts a sub-matrix from an existing matrix, provided you
indicate the initial and final position of the sub-matrix. For example, if we want
to extract elements a

12

, a

13

, a

22

, and a

23

from the last result, as a 2

×2 sub-

matrix, in ALG mode, use:

Note: Function RDM provides a more direct and efficient way to transform lists
to arrays and vice versa, than that provided at the end of Chapter 9.

Advertising