Home > HP > Calculator > HP 15c Manual

HP 15c Manual

    Download as PDF Print this page Share this page

    Have a look at the manual HP 15c Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 1114 HP manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.

    							 Section 12: Calculating with Matrices 171 
     
    Keystrokes Display 
    ´> 2 A 4 4 Transforms AP into Ã. 
    ´< C A 4 4 Designates matrix C as 
    result matrix. 
    ÷ C 4 1 
    Calculates XP and stores 
    in C. 
    |c C 2 2 Transforms XP into XC. 
    lC 0.0372   Recalls c11. 
    lC 0.1311   Recalls c12. 
    lC 0.0437   Recalls c21. 
    lC 0.1543   Recalls c22. 
    ´U 0.1543   Deactivates User mode. 
    ´> 0 0.1543   Redimensions all matrices 
    to 0×0. 
    The currents, represented by the complex matrix X, can be derived from C 
     
    Solving  the  matrix  equation  in  the  preceding  example  required  24  registers 
    of  matrix  memory – 16 for the  4×4 matrix A (which  was originally entered 
    as  a  4×2  matrix  representing  a 2×2 complex  matrix),  and  four  each  for  the 
    matrices B and C (each representing a 2×1 complex matrix). (However, you 
    would  have  used  four  fewer  registers  if  the  result  matrix  were  matrix B.) 
    Note  that  since X and B are  not  restricted  to  be  vectors  (that  is,  single-
    column matrices), X and B could have required more memory. 
    The  HP-15C  contains  sufficient  memory  to  solve,  using  the  method 
    described above, the complex matrix equation AX = B with X and B having 
    up  to  six  columns  if A is  2×2,  or  up  to  two  columns  if A is  3×3.* (The 
    allowable number of columns doubles if the constant matrix B is used as the 
    result matrix.) If X and B have more columns, or if A is 4×4, you can solve 
    the equation using the alternate method below. This method differs from the 
    preceding  one  in  that  it  involves  separate  inversion  and  multiplication 
    operations and fewer registers. 
                                                               * If all available memory space is dimensioned to the common pool (W: 1 64 0-0). Refer to appendix C, Memory Allocation. 
    
    
    
    
    
    i
    i
    I
    I
    2
    1
    0.15430.0437
    0.13110.0372X  
    						
    							172 Section 12: Calculating with Matrices 
     
    1. Store the elements of A in memory, in the form either of AP or of 
    AC. 
    2. Recall the descriptor of the matrix representing A into the display. 
    3. If the elements of A were entered in the form AC, press ´ p 
    to transform AC into AP. 
    4. Press ´> 2 to transform AP into Ã. 
    5. Press O< to designate the matrix representing A as the 
    result matrix. 
    6. Press ∕ to calculate (Ã)-1. 
    7. Redimension A to have half the number of rows as indicated in the 
    display of its descriptor after the preceding step. 
    8. Store the elements of B in memory, in the form either of BP or 
    of BC. 
    9. Recall the descriptor of the matrix representing A into the display. 
    10. Recall the descriptor of the matrix representing B into the display. 
    11. If the elements of B were entered in the form BC, press ´p to 
    transform BC into BP. 
    12. Press ´> 2 to transform BP into    
    13. Designate the result matrix; it must not be the same matrix as either 
    of the other two. 
    14. Press *. 
    15. Press ´> 4 to transpose the result matrix. 
    16. Press ´> 2. 
    17. Redimension the result matrix to have half the number of rows as 
    indicated in the display of its descriptor after the preceding step. 
    18. Press l< to recall the descriptor of the result matrix. 
    19. Press ´> 4 to calculate XP. 
    20. If you want the solution in the form XC, press |c 
      
    						
    							 Section 12: Calculating with Matrices 173 
     
    A problem using this procedure is given in the HP-15C Advanced Functions 
    Handbook under Solving a Large System of Complex Equations. 
    Miscellaneous Operations Involving Matrices 
    Using a Matrix Element With Register Operations 
    If  a  letter  key  specifying  a  matrix  is  pressed  after  any of  the  following 
    function keys, the operation is performed using the matrix element specified 
    by  the  row and column numbers in R0 and R1, just as though  it  were  a  data 
    storage register. 
    O* l* 
    O{+, -, *, ÷} l{+, -, *, 
    ÷} 
    e I 
    X  
    Using Matrix Descriptors in the Index Register  
    In  certain  applications,  you  may  want  to  perform  a  programmed  sequence 
    of  matrix  operations  using  any  of  the  matrices A through E.  In  this 
    situation,  the  matrix  operations  can  refer  to  whatever  matrix  descriptor  is 
    stored in the index register (RI). 
    If the Index register contains a matrix descriptor: 
     Pressing % after any of the functions listed above performs the 
    operations using the element specified by R0 and R1 and the matrix 
    specified in RI. 
     Pressing % after O| or l| performs the operation 
    using the element specified by the row and column numbers in the  
    Y- and X-registers and the matrix specified in RI. 
                                                               *  Also,  in  User  mode  the  row  and  column  numbers  in  R0 and  R1 are  incremented  according  to  the dimensions of the specified matrix.  
    						
    							174 Section 12: Calculating with Matrices 
     
     Pressing ´mV dimensions the matrix specified in RI 
    according to the dimensions in the X- and Y-registers. 
     Pressing lmV recalls to the X- and Y-registers the 
    dimensions of the matrix specified in RI. 
     Pressing GV or tV has the same result as pressing 
    G or t followed by the letter of the matrix specified in RI. 
    (This is not actually a matrix operation – only the letter in the 
    matrix descriptor is used.) 
    Conditional Tests on Matrix Descriptors 
    Four conditional tests – ~, T 0 (x≠ 0), T 5 (x = y), and T 
    6  (x≠y) – can  be  performed  with  matrix  descriptors  in  the  X- and  Y-
    registers,  Conditional  tests  can  be  used  to  control  program  execution,  as 
    described in section 8. 
    If  a  matrix descriptor  is  in  the  X-register,  the  result  of ~ will  be  false 
    and the  result  of T 0  will  be  true  (regardless  of  the  element  values  in 
    the matrix.) 
    If matrix descriptors are in the X- and Y-registers when T 5 or T 6 
    conditional  test  is  performed, x and y are  equal  if  the  same  descriptor  is  in 
    the  X- and  Y-registers,  and  not  equal  otherwise.  The  comparison  is  made 
    between  the  descriptors  themselves,  not  between  the  elements of  the 
    specified matrices. 
    Other conditional tests cant be used with matrix descriptors. 
    Stack Operation for Matrix Calculations 
    During  matrix  calculations,  the  contents  of  the  stack  registers  shift  much 
    like they do during numeric calculations. 
    For  some  matrix  calculations,  the  result  is  stored  in  the  result  matrix.  The 
    arguments – one  or  two  descriptors  or  numbers  in  the  X-register  or  the  X- 
    and  Y-registers – are  combined  by  the  operation,  and  the  descriptor  of  the 
    result  matrix is placed in the  X-register. (The  argument  from the  X-register 
    is placed in the LAST X register.)  
    						
    							 Section 12: Calculating with Matrices 175 
     
     
    Several  matrix  functions  operate  on  the  matrix  specified  in  the  X-register 
    only  and  store  the  result  in  the  same  matrix.  For  these  operations  the 
    contents  of  the  stack  (including  the LAST  X  register)  are  not  moved – 
    although the display changes to show the new dimensions if necessary. 
    For  the > 7, > 8,  and > 9  functions,  the  matrix 
    descriptor  specified  in  the  X-register  is  placed  in  the  LAST  X  register  and 
    the norm or (for > 9) the determinant is placed in the X-register. The 
    Y-, Z-, and T-registers arent changed. 
    When you recall descriptors or matrix elements into the X-register (with the 
    stack enabled), other descriptors and numbers already in  the  stack  move  up 
    in  the  stack – and  the  contents  of  the  T-register  are  lost.  (The  LAST  X 
    register is not changed.) When you store descriptors or matrix elements, the 
    stack (and the LAST X register) isnt changed. 
    In  contrast to  the  operation  described  above,  the O| and l| 
    functions  do  not  affect  the  LAST  X  register  and  operate  as  shown  on  the 
    next page.   
    						
    							176 Section 12: Calculating with Matrices 
     
     
    Using Matrix Operations in a Program 
    If  the  calculator  is  in  User  mode  during  program  entry  when  you  enter  a 
    O or l{A through E, %}  instruction  to  store  or  recall  a 
    matrix  element,  a u replaces  the  dash  usually  displayed  after  the  line 
    number.  When  this  line  is  executed  in a  running  program,  it  operates  as 
    though  the  calculator  were  in  User  mode.  That  is,  the  row  and  column 
    numbers  in R0 and  R1 are  automatically  incremented  according  to  the 
    dimensions  of  the  specified  matrix.  This  allows  you  to  access  elements 
    sequentially. (The USER annunciator  has  no  effect  during  program 
    execution.) 
    In addition, when the last element is accessed by the ―User‖ O or l 
    instruction – when R0 and R1 are  returned  to  1 – program  execution  skips 
    the  next  line.  This  is  useful  for  programming  a  loop that  stores  or  recalls 
    each  matrix  element,  then  continues  executing  the  program.  For  example, 
    the following sequence squares all elements of matrix D:   
    						
    							 Section 12: Calculating with Matrices 177 
     
     
    The > 7 (row norm) and > 8 (Frobenius norm) functions also 
    operate as conditional branching instructions in a program. If the X-register 
    contains a  matrix descriptor, these functions calculate the  norm in the  usual 
    manner, and program execution continues with the next program line. If the 
    X-register contains a number, program execution skips the next line. In both 
    cases,  the  original  contents  of  the  X-register  are  stored  in  the  LAST  X 
    register.  This  is  useful  for  testing  whether  a  matrix  descriptor  is  in  the  X-
    register during a program. 
    Summary of Matrix Functions  
    Keystroke(s) Results 
    |c Transforms ZP into ZC. 
    “ Changes sign of all elements in matrix specified in 
    X-register. 
    ´m {A 
    through E, V} 
    Dimensions specified matrix. 
    ´> 0 Dimensions all matrices to 0×0. 
    ´> 1 Sets row and column numbers in R0 and R1 to 1. 
    ´> 2 Transform ZP into   . 
    ´> 3 Transforms    into ZP. 
    ´> 4 Calculate transpose of matrix specified in X-register. 
    ´> 5 Multiplies transpose of matrix specified in Y-
    register with matrix specified in X-register. Stores in   
    						
    							178 Section 12: Calculating with Matrices 
     
    Keystroke(s) Results 
    result matrix. 
    ´> 6 Calculates residual in result matrix. 
    ´> 7 Calculates row norm of matrix specified in X-
    register. 
    ´> 8 Calculates Frobenius or Euclidean norm of matrix 
    specified in X-register. 
    ´> 9 Calculates determinant of matrix specified in X-
    register, Place LU in result matrix. 
    ´p Transforms ZC into ZP. 
    l{A through 
    E, %} 
    Recalls value from specified matrix, using row and 
    column numbers in R0 and R1. 
    l|{A 
    through E, %} 
    Recalls value from specified matrix using row and 
    column numbers in Y- and X-registers. 
    lm {A 
    through E, %} 
    Recalls dimensions of specified matrix into X- and 
    Y-registers. 
    l> {A 
    through E} 
    Displays descriptor of specified matrix. 
    l< Displays descriptor of result matrix. 
    ´ {A 
    through E} 
    If matrix descriptor is in display, copies all elements 
    of that matrix into corresponding elements of 
    specified matrix. If number is in display, stores that 
    value in all elements of specified matrix.  
    						
    							 Section 12: Calculating with Matrices 179 
     
     
    Keystroke(s) Results 
    O < Designates matrix specified in X-register as result 
    matrix. 
    ´ U Row and column numbers in R0 and R1 are 
    automatically incremented each time O or l 
    {A through E, %} is pressed. 
    ∕ Inverts matrix specified in X-register. Stores in result 
    matrix. Use ´ ∕ if User mode is on. 
    +, - If matrix descriptors specified in both X- and Y-
    registers, adds or subtracts corresponding elements of 
    matrices specified. If matrix descriptor specified in only 
    one of these registers, performs addition or subtraction 
    with all elements in specified matrix and scalar in other 
    register. Stores in result matrix. 
    * If matrix descriptors specified in both X- and Y-
    registers, calculates product of specified matrices (as 
    YX). If matrix specified in only one of these registers, 
    multiplies all elements in specified matrix by scalar in 
    other register. Stores in result matrix. 
    ÷ If matrix descriptors specified in both X- and Y-
    registers, multiplies inverse of matrix specified in X-
    register with matrix specified in Y-register. If matrix 
    specified in only Y-register, divides all elements of 
    specified matrix by scalar in other register. If matrix 
    specified in only X-register, multiplies each element of 
    inverse of specified matrix by scalar in other register. 
    Stores in result matrix. 
    For Further Information 
    The HP-15C  Advanced  Functions  Handbook presents  more  detailed  and 
    technical  aspects  of  the  matrix  functions  in  the  HP-15C,  including 
    applications.  The  topics  include: least-squares  calculations,  solving 
    nonlinear  equations,  ill-conditioned  and  singular  matrices,  accuracy 
    considerations, iterative refinement, and creating the identity matrix.  
    						
    							 
    180 
    Section 13 
    Finding the Roots  
    of an Equation 
    In many applications you need to solve equations of the form 
    f(x)=0.* 
    This means finding the values of x that 
    satisfy  the  equation.  Each  such  value 
    of x is called a root of the equation f(x) 
    =  0  and  a zero of  the  function f(x). 
    These  roots  (or  zeros)  that  are  real 
    numbers  are  called real roots (or  real 
    zeros). For many problems the roots of 
    an  equation  can  be  determined 
    analytically  through  algebraic 
    manipulation; in many other instances, 
    this  is  not  possible.  Numerical 
    techniques  can  be  used  to  estimate  the 
    roots  when  analytical  methods are  not  suitable.  When  you  use  the _ 
    key on  your HP-15C,  you utilize  an advanced numerical  technique  that  lets 
    you  effectively  and  conveniently  find real  roots for  a  wide  range  of 
    equations.†=
    Using _ 
    In  calculating  roots,  the _ operation  repeatedly  calls up  and  executes 
    a subroutine that you write for evaluating f(x). 
                                                               * Actually, any equation with one variable can be expressed in this form. For example, f(x) = a is equivalent to f(x) – a = 0, and f(x) = g(x) is equivalent to f(x) – g(x) = 0. † The _ function  does  not  use  the  imaginary  stack.  Refer  to  the HP-15C Advanced  Functions Handbook for information about complex roots.   
    						
    All HP manuals Comments (0)