home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d2xx / d267 / matlab.lha / Matlab / matlab.zoo / matlab / Help.lis next >
Encoding:
File List  |  1981-01-01  |  30.4 KB  |  775 lines

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