User Commands  - lala (1)

NAME

lala(1f) - interpret matrix expressions using a shell-like interface

CONTENTS

Synopsis
Description
Options
Author
Examples

SYNOPSIS

lala [expression(s)] | [ --help| --version]

DESCRIPTION

lala(1) is an interactive computer program that serves as a convenient "laboratory" for computations involving matrices. It provides easy access to matrix software developed by the LINPACK and EISPACK projects. The capabilities range from standard tasks such as solving simultaneous linear equations and inverting matrices, through symmetric and nonsymmetric eigenvalue problems, to fairly sophisticated matrix tools such as the singular value decomposition.

OPTIONS

--help display this help and exit
--version
  output version information and exit
expression(s)
  if expressions are supplied they are evaluated and the program terminates.

AUTHOR

This is heavily based on a program from the Department of Computer Science, University of New Mexico, by Cleve Moler.

EXAMPLES

Sample commands

    # Example 1: introductory usage:
    lala
    a=<1 2 3;5 4 6;7 8 9>
    b=<5;6;7>
    a*b
    b*a
    det(a)
    quit

An explanation of Example 1:

    // For this session the <> character is the LALA prompt.
     <> A=<1 2 3;5 4 6;7 8 9>            <---  you enter this
     A     =                             <---  LALA response
         1.    2.    3.
         5.    4.    6.
         7.    8.    9.
     <> b=<5;6;7>
     b     =
         5.
         6.
         7.

<> A*b <--- you enter "multiply A and b"

ANS = <--- LALA response 38. 91. 146.

<> b*A <---you enter "multiply b and A" /--ERROR <--- LALA response

    INCOMPATIBLE FOR MULTIPLICATION

<> det(A)
  <--- Take the determinant of A
ANS = <---LALA response
        18.

<> quit
  <--- you quit LALA
total flops
  34

    ADIOS

// --------------------------------------

Example 2: Simple looping and conditionals are also available

    lala
    //Eigenvalue sensitivity example. See section 8 of the Users’ Guide.
    B = <3 0 7; 0 2 0; 0 0 1>
    L = <1 0 0; 2 1 0; -3 4 1>,  M = L\L’
    A = M*B/M
    A = round(A)
    <X,D> = eig(A)
    long,  diag(D),  short
    cond(X)
    X = X/diag(X(3,:)),  cond(X)
    Y = inv(X’),  Y’*A*X
    for j = 1:3, c(j) = norm(Y(:,j))*norm(X(:,j));

    C

E = -1.e-6*Y(:,1)*X(:,1)’
eig(A + .4*E),
  eig(A + .5*E)
r = .4; s = .5; while s-r > 1.e-14, t = (r+s)/2; d = eig(A+t*E); ... if imag(d(1))=0, r = t; else, s = t;
long, t = r
A+t*e, eig(A+t*E)
<X,D> = eig(A+t*E);
  X = X/diag(X(3,:))
short, cond(X) // --------------------------------------

Use the HELP command for further information. For example, to enter HELP on the entire manual, display directions for using HELP and place a User manual in the file "lala.userguide.txt", enter

    lala
    <>help manual
    continue ...
    h // show directions for using "help"
    w lala.userguide.txt
    continue ...
    q
    quit


Nemo Release 3.1 lala (1) February 23, 2025
Generated by manServer 1.08 from 6ebdd77e-c422-4c46-8317-1e4bde56225f using man macros.