home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / libs / matlab.lzh / MATLAB / MATLAB.LZH / help.lis < prev    next >
Encoding:
File List  |  1991-04-13  |  30.4 KB  |  774 lines

  1. Appendix.  The HELP document
  2.  
  3. NEWS MATLAB NEWS dated 3/06/91.
  4.  
  5.  This is a maintenance release of Amiga Matlab.  This release has been
  6.  reorganized and debugged, and should prove much more solid than previous
  7.  releases.  This release was reorganized by Mike Broida.  Bug fixes run
  8.  in the hundreds. This release has also been compiled for A2500 and A3000.
  9.  This release will do 3D Plots, X-Y plots, Contour plots, Polar plots, 
  10.  and Histograms.  The Plot package is based on DigLib, written for PDP-11
  11.  and VAX by Hal Brand, ported to Amiga by Dr. Craig Wuest of LLNL,
  12.  debugged and enhanced by Jim Locker and Mike Broida.
  13.  
  14.  If you would like a copy of MATLAB source, Diglib source, and the users 
  15.  guide, send two 3.5 disks and $5.00 american to:
  16.  
  17.   Jim Locker
  18.   4443 N. Hyland Ave.
  19.   Dayton Oh 45424
  20.  
  21.  If you are already on my list of contributors, the $5.00 is waived, just 
  22.  send the disks.
  23.  
  24. INTRO Welcome to MATLAB.
  25.  
  26.  Here are a few sample statements:
  27.  
  28.  A = <1 2; 3 4>
  29.  b = <5 6>'
  30.  x = A\b
  31.  <V,D> = eig(A),  norm(A-V*D/V)
  32.  help \ , help eig
  33.  exec('demo',7)
  34.  
  35.  For more information, see the MATLAB Users' Guide which  is
  36.  contained in file ...  or may be obtained from Jim Locker.
  37.  See the HELP NEWS section.
  38.  
  39. HELP HELP gives assistance.
  40.  HELP HELP obviously prints this message.
  41.  To see all the HELP messages, list the file ... .
  42.  
  43. <     < > Brackets used in forming vectors and matrices.
  44.  <6.9  9.64  SQRT(-1)>  is  a  vector  with  three  elements
  45.  separated  by  blanks.   <6.9,  9.64, sqrt(-1)> is the same
  46.  thing.  <1+I 2-I 3>  and  <1 +I 2 -I 3>  are not the  same.
  47.  The first has three elements, the second has five.
  48.  <11 12 13; 21 22 23>  is a 2 by 3 matrix .   The  semicolon
  49.  ends the first row.
  50.  
  51.  Vectors and matrices can be used inside < > brackets.
  52.  <A B; C>  is allowed if the number of rows  of   A   equals
  53.  the  number  of rows of  B  and the number of columns of  A
  54.  plus the number of columns of   B   equals  the  number  of
  55.  columns  of   C  .   This  rule  generalizes in a hopefully
  56.  obvious way to allow fairly complicated constructions.
  57.  
  58.  A = < >  stores an empty matrix in  A , thereby removing it
  59.  from the list of current variables.
  60.  
  61.  For the use of < and > on the left of  the  =  in  multiple
  62.  assignment statements, see LU, EIG, SVD and so on.
  63.  
  64.  In WHILE and IF clauses, <>  means  less  than  or  greater
  65.  than,  i.e.  not  equal, < means less than, > means greater
  66.  than, <= means less than or equal, >= means greater than or
  67.  equal.
  68.  
  69.  For the use of > and < to delineate macros, see MACRO.
  70.  
  71. > See < .  Also see MACRO.
  72.  
  73. ( ( ) Used to indicate precedence in  arithmetic  expressions
  74.  in  the  usual way.  Used to enclose arguments of functions
  75.  in the usual way.  Used to enclose  subscripts  of  vectors
  76.  and  matrices  in  a  manner somewhat more general than the
  77.  usual way.  If  X   and   V  are  vectors,  then   X(V)  is
  78.  <X(V(1)),  X(V(2)),  ...,  X(V(N))> .  The components of  V
  79.  are rounded to nearest integers and used as subscripts.  An
  80.  error  occurs  if  any  such  subscript  is  less than 1 or
  81.  greater than the dimension of  X .  Some examples:
  82.  X(3)  is the third element of  X .
  83.  X(<1 2 3>)  is the first three elements of  X .  So is
  84.  X(<SQRT(2), SQRT(3), 4*ATAN(1)>)  .
  85.  If  X  has  N  components,  X(N:-1:1) reverses them.
  86.  The same indirect subscripting is used in matrices.  If   V
  87.  has   M  components and  W  has  N  components, then A(V,W)
  88.  is the  M by N  matrix formed from the elements of A  whose
  89.  subscripts are the elements of  V  and  W .  For example...
  90.  A(<1,5>,:) = A(<5,1>,:)  interchanges rows 1 and 5 of  A .
  91.  
  92. ) See  ( .
  93.  
  94. = Used in assignment statements and to mean equality in WHILE
  95.  and IF clauses.
  96.  
  97. . Decimal point.  314/100, 3.14  and   .314E1   are  all  the
  98.  same.
  99.  
  100.  Element-by-element multiplicative operations  are  obtained
  101.  using  .*  ,  ./  , or .\ .  For example, C = A ./ B is the
  102.  matrix with elements  c(i,j) = a(i,j)/b(i,j) .
  103.  
  104.  Kronecker tensor products and quotients are  obtained  with
  105.  .*. , ./.  and .\. .  See KRON.
  106.  
  107.  Two or  more  points  at  the  end  of  the  line  indicate
  108.  continuation.    The   total  line  length  limit  is  1024
  109.  characters.
  110.  
  111. , Used to separate matrix subscripts and function  arguments.
  112.  Used  at  the  end  of  FOR, WHILE and IF clauses.  Used to
  113.  separate statements  in  multi-statement  lines.   In  this
  114.  situation,  it  may  be  replaced  by semicolon to suppress
  115.  printing.
  116.  
  117. ; Used inside brackets to end rows.
  118.  Used after an expression or statement to suppress printing.
  119.  See SEMI.
  120.  
  121. \ Backslash or matrix left division.   A\B   is  roughly  the
  122.  same  as   INV(A)*B  , except it is computed in a different
  123.  way.  If  A  is an N by N matrix and  B  is a column vector
  124.  with  N  components, or a matrix with several such columns,
  125.  then X = A\B  is the solution to  the  equation   A*X  =  B
  126.  computed  by  Gaussian  elimination.   A warning message is
  127.  printed if  A is badly scaled or nearly singular.
  128.  A\EYE produces the inverse of  A .
  129.  
  130.  If  A  is an  M by N  matrix with  M < or > N  and  B  is a
  131.  column vector with  M  components, or a matrix with several
  132.  such columns, then  X = A\B  is the solution in  the  least
  133.  squares  sense  to  the under- or overdetermined system  of
  134.  equations A*X = B .  The  effective  rank,  K,  of   A   is
  135.  determined  from  the  QR  decomposition  with pivoting.  A
  136.  solution  X  is  computed  which  has  at  most  K  nonzero
  137.  components  per column.  If  K < N this will usually not be
  138.  the same solution as PINV(A)*B .
  139.  A\EYE produces a generalized inverse of  A .
  140.  
  141.  If A and B have the  same  dimensions,  then  A  .\  B  has
  142.  elements a(i,j)\b(i,j) .
  143.  
  144.  Also, see EDIT.
  145.  
  146. / Slash or matrix right division.  B/A  is roughly  the  same
  147.  as  B*INV(A) .  More precisely,  B/A = (A'\B')' .  See \ .
  148.  
  149.  IF A and B have the  same  dimensions,  then  A  ./  B  has
  150.  elements a(i,j)/b(i,j) .
  151.  
  152.  Two or more slashes together on a line indicate  a  logical
  153.  end of line.  Any following text is ignored.
  154.  
  155. ' Transpose.  X'  is the complex conjugate transpose of  X  .
  156.  Quote.   'ANY  TEXT'   is a vector whose components are the
  157.  MATLAB internal codes for the characters.  A  quote  within
  158.  the text is indicated by two quotes.  See DISP and FILE .
  159.  
  160. + Addition.  X + Y .  X and Y must have the same dimensions.
  161.  
  162. - Subtraction.  X  -  Y  .   X  and  Y  must  have  the  same
  163.  dimensions.
  164.  
  165. * Matrix multiplication, X*Y .  Any scalar (1  by  1  matrix)
  166.  may multiply anything.  Otherwise, the number of columns of
  167.  X must equal the number of rows of Y .
  168.  
  169.  Element-by-element multiplication is obtained with X .* Y .
  170.  
  171.  The Kronecker tensor product is denoted by X .*. Y .
  172.  
  173.  Powers.  X**p  is  X  to the   p   power.   p   must  be  a
  174.  scalar.  If  X  is a matrix, see  FUN .
  175.  
  176. : Colon.  Used in subscripts,  FOR  iterations  and  possibly
  177.  elsewhere.
  178.  J:K  is the same as  <J, J+1, ..., K>
  179.  J:K  is empty if  J > K .
  180.  J:I:K  is the same as  <J, J+I, J+2I, ..., K>
  181.  J:I:K  is empty if  I > 0 and J > K or if I < 0 and J < K .
  182.  The colon notation can be used to pick out  selected  rows,
  183.  columns and elements of vectors and matrices.
  184.  A(:)  is all the  elements  of  A,  regarded  as  a  single
  185.  column.
  186.  A(:,J)  is the  J-th  column of A
  187.  A(J:K)  is  A(J),A(J+1),...,A(K)
  188.  A(:,J:K)  is  A(:,J),A(:,J+1),...,A(:,K) and so on.
  189.  For the use of the colon in the FOR statement, See FOR .
  190.  
  191. ABS ABS(X)  is the absolute value, or complex modulus,  of  the
  192.  elements of X .
  193.  
  194. ANS Variable created automatically  when  expressions  are  not
  195.  assigned to anything else.
  196.  
  197. ATAN ATAN(X)  is the arctangent of  X .  See FUN .
  198.  
  199. BASE BASE(X,B) is a vector containing the base B  representation
  200.  of   X  .   This is often used in conjunction with DISPLAY.
  201.  DISPLAY(X,B)  is  the  same  as  DISPLAY(BASE(X,B)).    For
  202.  example,    DISP(4*ATAN(1),16)   prints   the   hexadecimal
  203.  representation of pi.
  204.  
  205. CHAR CHAR(K)  requests  an  input  line  containing   a   single
  206.  character  to  replace  MATLAB  character  number  K in the
  207.  following table.  For example, CHAR(45) replaces backslash.
  208.  CHAR(-K) replaces the alternate character number K.
  209.  
  210.    K  character alternate name
  211.         0 - 9  0 - 9   0 - 9 digits
  212.               10 - 35 A - Z   a - z letters
  213.   36                      blank
  214.   37 ( ( lparen
  215.   38 ) ) rparen
  216.   39 ; ; semi
  217.   40 : | colon
  218.   41 + + plus
  219.   42 - - minus
  220.   43 * * star
  221.   44 / / slash
  222.   45 \ $ backslash
  223.   46 = = equal
  224.   47 . . dot
  225.   48 , , comma
  226.   49 ' " quote
  227.   50 < [ less
  228.   51 > ] great
  229.  
  230. CHOL Cholesky factorization.  CHOL(X)  uses  only  the  diagonal
  231.  and upper triangle of  X .  The lower triangular is assumed
  232.  to be the (complex conjugate) transpose of the  upper.   If
  233.  X   is  positive  definite,  then  R = CHOL(X)  produces an
  234.  upper triangular  R  so that  R'*R = X .   If   X   is  not
  235.  positive definite, an error message is printed.
  236.  
  237. CHOP Truncate arithmetic.  CHOP(P) causes P places to be chopped
  238.  off   after   each   arithmetic   operation  in  subsequent
  239.  computations.  This means  P  hexadecimal  digits  on  some
  240.  computers  and  P octal digits on others.  CHOP(0) restores
  241.  full precision.
  242.  
  243. CLEAR Erases all variables, except EPS, FLOP, EYE and RAND.
  244.  X = <>  erases only variable  X .  So does CLEAR X .
  245.  
  246. COND Condition number in 2-norm.  COND(X) is the  ratio  of  the
  247.  largest singular value of  X  to the smallest.
  248.  
  249. CONJG CONJG(X)  is the complex conjugate of  X .
  250.  
  251. COS COS(X)  is the cosine of  X .  See FUN .
  252.  
  253. DET DET(X)  is the determinant of the square matrix  X .
  254.  
  255. DIAG If  V  is  a  row  or  column  vector  with  N  components,
  256.  DIAG(V,K)   is a square matrix of order  N+ABS(K)  with the
  257.  elements of  V  on the K-th diagonal.  K = 0  is  the  main
  258.  diagonal,  K  >  0  is above the main diagonal and K < 0 is
  259.  below the main diagonal.  DIAG(V)  simply puts  V   on  the
  260.  main diagonal.
  261.  eg. DIAG(-M:M) + DIAG(ONES(2*M,1),1) + DIAG(ONES(2*M,1),-1)
  262.  produces a tridiagonal matrix of order 2*M+1 .
  263.  IF  X  is a matrix,  DIAG(X,K)  is a column  vector  formed
  264.  from the elements of the K-th diagonal of  X .
  265.  DIAG(X)  is the main diagonal of  X .
  266.  DIAG(DIAG(X))  is a diagonal matrix .
  267.  
  268. DIARY DIARY('file') causes a  copy  of  all  subsequent  terminal
  269.  input and most of the resulting output to be written on the
  270.  file. DIARY(0) turns it off.  See FILE.
  271.  
  272. DISP DISPLAY(X) prints X  in  a  compact  format.   If  all  the
  273.  elements  of  X  are  integers  between 0 and 51, then X is
  274.  interpreted  as  MATLAB  text  and   printed   accordingly.
  275.  Otherwise,  +  ,  -   and  blank  are printed for positive,
  276.  negative and zero elements.  Imaginary parts are ignored.
  277.  DISP(X,B) is the same as DISP(BASE(X,B)).
  278.  
  279. EDIT There  are  no   editing   features   available   on   most
  280.  installations and EDIT is not a command.  However, on a few
  281.  systems a command line consisting of a single  backslash  \
  282.  will  cause  the local file editor to be called with a copy
  283.  of the  previous  input  line.   When  the  editor  returns
  284.  control to MATLAB, it will execute the line again.
  285.  
  286. EIG Eigenvalues and eigenvectors.
  287.  EIG(X) is a vector containing the eigenvalues of  a  square
  288.  matrix  X .
  289.  <V,D>  =  EIG(X)   produces  a  diagonal  matrix    D    of
  290.  eigenvalues  and  a  full  matrix  V  whose columns are the
  291.  corresponding eigenvectors so that  X*V = V*D .
  292.  
  293. ELSE Used with IF .
  294.  
  295. END Terminates the scope  of  FOR,  WHILE  and  IF  statements.
  296.  Without  END's,  FOR  and WHILE repeat all statements up to
  297.  the end of the line.  Each END is paired with  the  closest
  298.  previous  unpaired FOR or WHILE and serves to terminate its
  299.  scope.  The line
  300.  FOR I=1:N, FOR J=1:N, A(I,J)=1/(I+J-1); A
  301.  would cause A to be printed  N**2  times, once for each new
  302.  element.  On the other hand, the line
  303.  FOR I=1:N, FOR J=1:N, A(I,J)=1/(I+J-1); END, END, A
  304.  will lead to only the final printing of  A .
  305.  Similar considerations apply to WHILE.
  306.  EXIT terminates execution of loops or of MATLAB itself.
  307.  
  308. EPS Floating point relative  accuracy.   A  permanent  variable
  309.  whose  value is initially the distance from 1.0 to the next
  310.  largest floating point number.  The  value  is  changed  by
  311.  CHOP,  and  other values may be assigned.  EPS is used as a
  312.  default tolerance by PINV and RANK.
  313.  
  314. EXEC EXEC('file',k) obtains  subsequent  MATLAB  input  from  an
  315.  external  file.  The printing of input is controlled by the
  316.  optional parameter k .
  317.  If k = 1 , the input is echoed.
  318.  If k = 2 , the MATLAB prompt <> is printed.
  319.  If k = 4 , MATLAB pauses before each prompt and waits for a
  320.  null line to continue.
  321.  If k = 0 , there is no echo, prompt or pause.  This is  the
  322.  default if the exec command is followed by a semicolon.
  323.  If k = 7 , there will be echos, prompts and pauses. This is
  324.  useful for demonstrations on video terminals.
  325.  If k = 3 , there will be echos and prompts, but no  pauses.
  326.  This is the the default if the exec command is not followed
  327.  by a semicolon.
  328.  EXEC(0) causes subsequent input to  be  obtained  from  the
  329.  terminal. An end-of-file has the same effect.
  330.  EXEC's may be nested, i.e. the text in the file may contain
  331.  EXEC of another file.  EXEC's may also be driven by FOR and
  332.  WHILE loops.
  333.  
  334. EXIT Causes termination of a FOR or WHILE loop.
  335.  If not in a loop, terminates execution of MATLAB.
  336.  
  337. EXP EXP(X)  is the exponential of  X ,  e  to the X .  See  FUN.
  338.  
  339.  
  340. EYE Identity matrix.  EYE(N) is the N  by  N  identity  matrix.
  341.  EYE(M,N)   is an M by N matrix with 1's on the diagonal and
  342.  zeros elsewhere.  EYE(A)  is the same size  as   A  .   EYE
  343.  with  no  arguments is an identity matrix of whatever order
  344.  is appropriate in the context.   For  example,  A  +  3*EYE
  345.  adds  3  to each diagonal element of  A .
  346.  
  347. FILE The EXEC, SAVE, LOAD,  PRINT  and  DIARY  functions  access
  348.  files.   The  'file'  parameter  takes  different forms for
  349.  different operating systems.  On most systems,  'file'  may
  350.  be a string of up to 32 characters in quotes.  For example,
  351.  SAVE('A') or EXEC('matlab/demo.exec') .  The string will be
  352.  used as the name of a file in the local operating system.
  353.  On all systems, 'file' may be a positive integer   k   less
  354.  than  10  which  will  be  used  as  a FORTRAN logical unit
  355.  number. Some systems then automatically access a file  with
  356.  a  name  like  FORT.k  or FORk.DAT. Other systems require a
  357.  file with a name like FT0kF001 to be assigned  to  unit   k
  358.  before  MATLAB  is  executed. Check your local installation
  359.  for details.
  360.  
  361. FLOPS Count of floating point operations.
  362.  FLOPS  is  a  permanently  defined  row  vector  with   two
  363.  elements.    FLOPS(1)  is  the  number  of  floating  point
  364.  operations counted during the previous statement.  FLOPS(2)
  365.  is  a  cumulative total.  FLOPS can be used in the same way
  366.  as any other vector.  FLOPS(2) = 0  resets  the  cumulative
  367.  total.   In  addition,  FLOPS(1) will be printed whenever a
  368.  statement is terminated by an extra comma.  For example,
  369.  X = INV(A); ,
  370.  or
  371.  COND(A),   (as the last statement on the line).
  372.  HELP FLPS gives more details.
  373.  
  374. FLPS More detail on FLOPS.
  375.  It is not feasible to count absolutely all  floating  point
  376.  operations,  but  most  of  the important ones are counted.
  377.  Each multiply and add in a real vector operation such as  a
  378.  dot  product  or  a 'saxpy' counts one flop.  Each multiply
  379.  and add in a complex vector  operation  counts  two  flops.
  380.  Other additions, subtractions and multiplications count one
  381.  flop each if the result is real and two flops if it is not.
  382.  Real  divisions  count one and complex divisions count two.
  383.  Elementary functions count one if real and two if  complex.
  384.  Some examples.  If A and B are real N by N matrices, then
  385.  A + B  counts N**2 flops,
  386.  A*B    counts N**3 flops,
  387.  A**100 counts 99*N**3 flops,
  388.  LU(A)  counts roughly (1/3)*N**3 flops.
  389.  
  390. FOR Repeat statements a specific number of times.
  391.  FOR variable = expr, statement, ..., statement, END
  392.  The END at the end of a line may  be  omitted.   The  comma
  393.  before  the  END  may  also be omitted.  The columns of the
  394.  expression are stored one at a time  in  the  variable  and
  395.  then the following statements, up to the END, are executed.
  396.  The expression is often of the form X:Y, in which case  its
  397.  columns  are  simply  scalars.  Some examples (assume N has
  398.  already been assigned a value).
  399.  FOR I = 1:N, FOR J = 1:N, A(I,J) = 1/(I+J-1);
  400.  FOR J = 2:N-1, A(J,J) = J; END; A
  401.  FOR S = 1.0: -0.1: 0.0, ...  steps S with increments of -0.1
  402.  FOR E = EYE(N), ...   sets  E  to the unit N-vectors.
  403.  FOR V = A, ...   has the same effect as
  404.  FOR J = 1:N, V = A(:,J); ...  except J is also set here.
  405.  
  406. FUN For matrix arguments  X , the  functions  SIN,  COS,  ATAN,
  407.  SQRT,  LOG,  EXP and X**p are computed using eigenvalues  D
  408.  and eigenvectors  V .  If  <V,D> =  EIG(X)   then   f(X)  =
  409.  V*f(D)/V  .   This method may give inaccurate results if  V
  410.  is badly conditioned.  Some idea of  the  accuracy  can  be
  411.  obtained by comparing  X**1  with  X .
  412.  For vector arguments,  the  function  is  applied  to  each
  413.  component.
  414.  
  415. HESS Hessenberg form.  The Hessenberg form of a matrix  is  zero
  416.  below the first subdiagonal.  If the matrix is symmetric or
  417.  Hermitian,  the  form  is  tridiagonal.   <P,H>  =  HESS(A)
  418.  produces  a  unitary  matrix P and a Hessenberg matrix H so
  419.  that A = P*H*P'.  By itself, HESS(A) returns H.
  420.  
  421. HILB Inverse Hilbert matrix.  HILB(N)  is the inverse of  the  N
  422.  by  N   matrix  with elements  1/(i+j-1), which is a famous
  423.  example of a badly conditioned matrix.  The result is exact
  424.  for  N  less than about 15, depending upon the computer.
  425.  
  426. IF Conditionally execute statements.  Simple form...
  427.  IF expression rop expression, statements
  428.  where rop is =, <, >, <=, >=, or  <>  (not  equal)  .   The
  429.  statements  are  executed  once if the indicated comparison
  430.  between the real parts of the first components of  the  two
  431.  expressions  is true, otherwise the statements are skipped.
  432.  Example.
  433.  IF ABS(I-J) = 1, A(I,J) = -1;
  434.  More complicated forms use END in the same way it  is  used
  435.  with FOR and WHILE and use ELSE as an abbreviation for END,
  436.  IF expression not rop expression .  Example
  437.  FOR I = 1:N, FOR J = 1:N, ...
  438.     IF I = J, A(I,J) = 2; ELSE IF ABS(I-J) = 1, A(I,J) = -1; ...
  439.     ELSE A(I,J) = 0;
  440.  An easier way to accomplish the same thing is
  441.  A = 2*EYE(N);
  442.  FOR I = 1:N-1, A(I,I+1) = -1; A(I+1,I) = -1;
  443.  
  444. IMAG IMAG(X)  is the imaginary part of  X .
  445.  
  446. INV INV(X)  is the inverse of the square matrix  X .  A warning
  447.  message  is  printed  if   X   is  badly  scaled  or nearly
  448.  singular.
  449.  
  450. KRON KRON(X,Y) is the Kronecker tensor product of X and Y  .  It
  451.  is  also  denoted by X .*. Y . The result is a large matrix
  452.  formed by taking all possible products between the elements
  453.  of  X  and  those  of Y . For example, if X is 2 by 3, then
  454.  X .*. Y is
  455.  
  456.   < x(1,1)*Y  x(1,2)*Y  x(1,3)*Y
  457.     x(2,1)*Y  x(2,2)*Y  x(2,3)*Y >
  458.  
  459.  The five-point discrete Laplacian for an n-by-n grid can be
  460.  generated by
  461.  
  462.   T = diag(ones(n-1,1),1);  T = T + T';  I = EYE(T);
  463.   A = T.*.I + I.*.T - 4*EYE;
  464.  
  465.  Just  in  case  they  might  be  useful,  MATLAB   includes
  466.  constructions called Kronecker tensor quotients, denoted by
  467.  X ./. Y and X .\. Y .  They are obtained by  replacing  the
  468.  elementwise multiplications in X .*. Y with divisions.
  469.  
  470. LINES An internal count is kept of the number of lines of  output
  471.  since  the  last  input.   Whenever this count approaches a
  472.  limit, the  user  is  asked  whether  or  not  to  suppress
  473.  printing  until the next input.  Initially the limit is 25.
  474.  LINES(N) resets the limit to N .
  475.  
  476. LOAD LOAD('file') retrieves all the variables from  the  file  .
  477.  See  FILE  and  SAVE for more details.  To prepare your own
  478.  file for LOADing, change the READs to WRITEs  in  the  code
  479.  given under SAVE.
  480.  
  481. LOG LOG(X)  is the  natural  logarithm  of   X  .   See  FUN  .
  482.  Complex results are produced if  X  is not positive, or has
  483.  nonpositive eigenvalues.
  484.  
  485. LONG Determine output format.   All  computations  are  done  in
  486.  complex arithmetic and double precision if it is available.
  487.  SHORT and  LONG  merely  switch  between  different  output
  488.  formats.
  489.  SHORT    Scaled fixed point format with about 5 digits.
  490.  LONG     Scaled fixed point format with about 15 digits.
  491.  SHORT E  Floating point format with about 5 digits.
  492.  LONG E   Floating point format with about 15 digits.
  493.  LONG Z   System dependent format, often hexadecimal.
  494.  
  495. LU Factors from Gaussian elimination.  <L,U> = LU(X)  stores a
  496.  upper triangular matrix in  U  and a 'psychologically lower
  497.  triangular matrix', i.e. a product of lower triangular  and
  498.  permutation matrices, in L , so that  X = L*U .  By itself,
  499.  LU(X) returns the output from CGEFA .
  500.  
  501. MACRO The macro facility involves text and inward pointing  angle
  502.  brackets.  If  STRING  is  the  source  text for any MATLAB
  503.  expression or statement, then
  504.   t = 'STRING';
  505.  encodes the text as a vector of integers  and  stores  that
  506.  vector in  t .  DISP(t) will print the text and
  507.   >t<
  508.  causes the text to be interpreted, either as a statement or
  509.  as a factor in an expression.  For example
  510.   t = '1/(i+j-1)';
  511.   disp(t)
  512.   for i = 1:n, for j = 1:n, a(i,j) = >t<;
  513.  generates the Hilbert matrix of order n.
  514.  Another example showing indexed text,
  515.   S = <'x = 3 '
  516.        'y = 4 '
  517.        'z = sqrt(x*x+y*y)'>
  518.   for k = 1:3, >S(k,:)<
  519.  It is necessary that the strings making up  the  "rows"  of
  520.  the "matrix"  S  have the same lengths.
  521.  
  522. MAGIC Magic square.  MAGIC(N) is an N  by  N  matrix  constructed
  523.  from  the integers 1 through N**2 with equal row and column
  524.  sums.
  525.  
  526. NORM For matrices..
  527.  NORM(X)  is the largest singular value of  X .
  528.  NORM(X,1)  is the 1-norm of  X .
  529.  NORM(X,2)  is the same as NORM(X) .
  530.  NORM(X,'INF')  is the infinity norm of  X .
  531.  NORM(X,'FRO')  is the F-norm, i.e.  SQRT(SUM(DIAG(X'*X))) .
  532.  For vectors..
  533.  NORM(V,P) = (SUM(V(I)**P))**(1/P) .
  534.  NORM(V) = NORM(V,2) .
  535.  NORM(V,'INF') = MAX(ABS(V(I))) .
  536.  
  537. ONES All ones.  ONES(N)  is an N by N matrix of ones.  ONES(M,N)
  538.  is an M by N matrix of ones .  ONES(A)  is the same size as
  539.  A  and all ones .
  540.  
  541. ORTH Orthogonalization.   Q  =  ORTH(X)   is   a   matrix   with
  542.  orthonormal  columns,  i.e. Q'*Q = EYE, which span the same
  543.  space as the columns of  X .
  544.  
  545. PINV Pseudoinverse.  X = PINV(A) produces a matrix   X   of  the
  546.  same  dimensions as  A' so that  A*X*A = A , X*A*X = X  and
  547.  AX  and  XA  are Hermitian .  The computation is  based  on
  548.  SVD(A)  and  any  singular values less than a tolerance are
  549.  treated   as    zero.     The    default    tolerance    is
  550.  NORM(SIZE(A),'inf')*NORM(A)*EPS.   This  tolerance  may  be
  551.  overridden with X = PINV(A,tol).  See RANK.
  552.  
  553. PLOT PLOT(X,'filename') enters a menu-driven plot routine.
  554.  X is any M by N matrix.  'filename' is optional.  Filename is
  555.  the name of a file which contains stored plot definitions. If
  556.  'filename' is present, then PLOT will operate in batch mode,
  557.  automatically loading and executing the stored plot definitions
  558.  with the matrix X.  As of the 19 Jan 1989 release, the PLOT batch
  559.  feature does not work, for reasons unknown.  For further info-
  560.  rmation, see the Matlab Plot manual.
  561.  
  562. POLY Characteristic polynomial.
  563.  If  A  is an N by N matrix, POLY(A) is a column vector with
  564.  N+1   elements   which   are   the   coefficients   of  the
  565.  characteristic polynomial,  DET(lambda*EYE - A) .
  566.  If V is a vector, POLY(V) is a vector  whose  elements  are
  567.  the  coefficients  of  the  polynomial  whose roots are the
  568.  elements of V .  For vectors, ROOTS and  POLY  are  inverse
  569.  functions  of  each  other,  up  to  ordering, scaling, and
  570.  roundoff error.
  571.  ROOTS(POLY(1:20)) generates Wilkinson's famous example.
  572.  
  573. PRINT PRINT('file',X) prints X on  the  file  using  the  current
  574.  format determined by SHORT, LONG Z, etc.  See FILE.
  575.  
  576. PROD PROD(X)  is the product of all the elements of  X .
  577.  
  578. QR Orthogonal-triangular decomposition.
  579.  <Q,R> = QR(X)  produces an upper triangular  matrix   R  of
  580.  the  same dimension as  X  and a unitary matrix  Q  so that
  581.  X = Q*R .
  582.  <Q,R,E> = QR(X)  produces a  permutation  matrix   E  ,  an
  583.  upper  triangular  R  with decreasing diagonal elements and
  584.  a unitary  Q  so that  X*E = Q*R .
  585.  By itself, QR(X) returns the output of CQRDC .  TRIU(QR(X))
  586.  is R .
  587.  
  588. RAND Random numbers and matrices.  RAND(N)  is an N by N  matrix
  589.  with  random  entries.  RAND(M,N)  is an M by N matrix with
  590.  random entries.  RAND(A)  is the same size as   A  .   RAND
  591.  with no arguments is a scalar whose value changes each time
  592.  it is referenced.
  593.  Ordinarily,  random numbers are  uniformly  distributed  in
  594.  the  interval  (0.0,1.0)  .   RAND('NORMAL')  switches to a
  595.  normal distribution  with  mean  0.0  and  variance  1.0  .
  596.  RAND('UNIFORM')  switches back to the uniform distribution.
  597.  RAND('SEED') returns the current value of the seed for  the
  598.  generator.    RAND('SEED',n)   sets   the   seed   to  n  .
  599.  RAND('SEED',0) resets the seed to 0, its value when  MATLAB
  600.  is first entered.
  601.  
  602. RANK Rank.  K = RANK(X) is the number of singular values  of   X
  603.  that are larger than NORM(SIZE(X),'inf')*NORM(X)*EPS.
  604.  K = RANK(X,tol) is the number of singular values of  X that
  605.  are larger than tol .
  606.  
  607. RCOND RCOND(X)   is  an  estimate  for  the  reciprocal  of   the
  608.  condition  of   X   in  the  1-norm obtained by the LINPACK
  609.  condition estimator.  If  X  is well conditioned,  RCOND(X)
  610.  is  near  1.0  .   If  X  is badly conditioned, RCOND(X) is
  611.  near 0.0 .
  612.  <R, Z> = RCOND(A) sets  R  to RCOND(A) and also produces  a
  613.  vector  Z so that
  614.        NORM(A*Z,1) = R*NORM(A,1)*NORM(Z,1)
  615.  So, if RCOND(A) is small, then  Z  is an  approximate  null
  616.  vector.
  617.  
  618. RAT An experimental  function  which  attempts  to  remove  the
  619.  roundoff   error  from  results  that  should  be  "simple"
  620.  rational numbers.
  621.  RAT(X) approximates each  element  of   X  by  a  continued
  622.  fraction of the form
  623.  
  624.       a/b = d1 + 1/(d2 + 1/(d3 + ... + 1/dk))
  625.  
  626.  with k <= len, integer di and abs(di) <= max .  The default
  627.  values of the parameters are len = 5 and max = 100.
  628.  RAT(len,max) changes the default values.  Increasing either
  629.  len or max increases the number of possible fractions.
  630.  <A,B> = RAT(X) produces integer matrices A and B so that
  631.  
  632.       A ./ B  =  RAT(X)
  633.  
  634.  Some examples:
  635.  
  636.   long
  637.   T = hilb(6), X = inv(T)
  638.   <A,B> = rat(X)
  639.   H = A ./ B, S = inv(H)
  640.  
  641.   short e
  642.   d = 1:8,  e = ones(d),  A = abs(d'*e - e'*d)
  643.   X = inv(A)
  644.   rat(X)
  645.   display(ans)
  646.  
  647.  
  648. REAL REAL(X)  is the real part of  X .
  649.  
  650. RETURN From the terminal, causes return to the operating  system
  651.  or  other  program  which  invoked  MATLAB.  From inside an
  652.  EXEC, causes  return  to  the  invoking  EXEC,  or  to  the
  653.  terminal.
  654.  
  655. RREF RREF(A) is the reduced row echelon form of the  rectangular
  656.  matrix.  RREF(A,B) is the same as RREF(<A,B>) .
  657.  
  658. ROOTS Find polynomial roots.  ROOTS(C)  computes the roots of the
  659.  polynomial  whose  coefficients  are  the  elements  of the
  660.  vector  C .  If  C  has  N+1  components, the polynomial is
  661.  C(1)*X**N + ... + C(N)*X + C(N+1) .  See POLY.
  662.  
  663. ROUND ROUND(X)  rounds  the  elements  of   X   to  the   nearest
  664.  integers.
  665.  
  666. SAVE SAVE('file') stores all the current variables in a file.
  667.  SAVE('file',X) saves only X .  See FILE .
  668.  The variables may be retrieved later by LOAD('file') or  by
  669.  your  own program using the following code for each matrix.
  670.  The lines involving XIMAG may be eliminated  if  everything
  671.  is known to be real.
  672.  
  673.   attach lunit to 'file'
  674.   REAL or DOUBLE PRECISION XREAL(MMAX,NMAX)
  675.   REAL or DOUBLE PRECISION XIMAG(MMAX,NMAX)
  676.   READ(lunit,101) ID,M,N,IMG
  677.   DO 10 J = 1, N
  678.      READ(lunit,102) (XREAL(I,J), I=1,M)
  679.      IF (IMG .NE. 0) READ(lunit,102) (XIMAG(I,J),I=1,M)
  680.     10 CONTINUE
  681.  
  682.  The formats used are system dependent.  The  following  are
  683.  typical.     See    SUBROUTINE   SAVLOD   in   your   local
  684.  implementation of MATLAB.
  685.  
  686.    101 FORMAT(4A1,3I4)
  687.    102 FORMAT(4Z18)
  688.    102 FORMAT(4O20)
  689.    102 FORMAT(4D25.18)
  690.  
  691. SCHUR Schur decomposition.  <U,T> = SCHUR(X)  produces  an  upper
  692.  triangular  matrix   T , with the eigenvalues of  X  on the
  693.  diagonal, and a unitary matrix  U so that  X =  U*T*U'  and
  694.  U'*U = EYE .  By itself, SCHUR(X) returns  T .
  695.  
  696. SHORT See LONG .
  697.  
  698. SEMI Semicolons at the end of  lines  will  cause,  rather  than
  699.  suppress,  printing.   A  second  SEMI restores the initial
  700.  interpretation.
  701.  
  702. SIN SIN(X)  is the sine of  X .  See FUN .
  703.  
  704. SIZE If X is an M by N matrix, then SIZE(X) is <M, N> .
  705.  Can also be used with a multiple assignment,
  706.   <M, N> = SIZE(X) .
  707.  
  708. SQRT SQRT(X)  is the square root of  X .   See  FUN  .   Complex
  709.  results  are  produced  if   X   is  not  positive,  or has
  710.  nonpositive eigenvalues.
  711.  
  712. STOP Use EXIT instead.
  713.  
  714. SUM SUM(X)   is  the  sum  of  all  the  elements   of    X   .
  715.  SUM(DIAG(X))  is the trace of  X .
  716.  
  717. SVD Singular value decomposition.  <U,S,V> = SVD(X)  produces a
  718.  diagonal  matrix  S , of the same dimension as  X  and with
  719.  nonnegative diagonal  elements  in  decreasing  order,  and
  720.  unitary matrices  U  and  V  so that  X = U*S*V' .
  721.  By itself, SVD(X) returns a vector containing the  singular
  722.  values.
  723.  <U,S,V>   =   SVD(X,0)   produces   the   "economy    size"
  724.  decomposition.   If  X  is m by n with m > n, then only the
  725.  first n columns of U are computed and S is n by n .
  726.  
  727. TRIL Lower triangle.  TRIL(X) is the lower triangular part of X.
  728.  TRIL(X,K) is the elements on and below the K-th diagonal of
  729.  X.  K = 0 is the main diagonal, K > 0  is  above  the  main
  730.  diagonal and K < 0 is below the main diagonal.
  731.  
  732. TRIU Upper triangle.  TRIU(X) is the upper triangular part of X.
  733.  TRIU(X,K) is the elements on and above the K-th diagonal of
  734.  X.  K = 0 is the main diagonal, K > 0  is  above  the  main
  735.  diagonal and K < 0 is below the main diagonal.
  736.  
  737. USER Allows personal  Fortran  subroutines  to  be  linked  into
  738.  MATLAB .  The subroutine should have the heading
  739.  
  740.      SUBROUTINE USER(A,M,N,S,T)
  741.      REAL or DOUBLE PRECISION A(M,N),S,T
  742.  
  743.  The MATLAB statement  Y = USER(X,s,t)  results in a call to
  744.  the  subroutine with a copy of the matrix  X  stored in the
  745.  argument  A , its column and row dimensions in  M  and  N ,
  746.  and  the scalar parameters  s  and  t  stored in  S  and  T
  747.  . If  s and t  are omitted, they are set to  0.0  .   After
  748.  the  return,   A  is stored in  Y .  The dimensions  M  and
  749.  N  may be reset within the subroutine.  The statement  Y  =
  750.  USER(K)  results in a call with M = 1, N = 1  and  A(1,1) =
  751.  FLOAT(K) .  After the subroutine has been written, it  must
  752.  be compiled and linked to the MATLAB object code within the
  753.  local operating system.
  754.  
  755. WHAT Lists commands and functions currently available.
  756.  
  757. WHILE Repeat statements an indefinite number of times.
  758.  WHILE expr rop expr, statement, ..., statement, END
  759.  where rop is =, <, >, <=, >=, or <> (not equal) .  The  END
  760.  at  the end of a line may be omitted.  The comma before the
  761.  END may also be omitted.  The commas  may  be  replaced  by
  762.  semicolons   to   avoid   printing.    The  statements  are
  763.  repeatedly executed as long  as  the  indicated  comparison
  764.  between  the  real parts of the first components of the two
  765.  expressions is true.   Example  (assume  a  matrix   A   is
  766.  already defined).
  767.  E = 0*A; F = E + EYE; N = 1;
  768.  WHILE NORM(E+F-E,1) > 0, E = E + F; F = A*F/N; N = N + 1;
  769.  E
  770.  
  771. WHO Lists current variables.
  772.  
  773. WHY Provides succinct answers to any questions.
  774.