home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / LANG.DI$ / FOR.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  782 b   |  23 lines

  1. %FOR     Repeat statements a specific number of times.
  2. %    The general form of a FOR statement is:
  3. %        FOR variable = expr, statement, ..., statement END
  4. %     The columns of the expression are stored one at a time in
  5. %     the variable and then the following statements, up to the
  6. %     END, are executed. The expression is often of the form X:Y,
  7. %     in which case its columns are simply scalars. Some examples
  8. %     (assume N has already been assigned a value).
  9. %          FOR I = 1:N,
  10. %              FOR J = 1:N,
  11. %                  A(I,J) = 1/(I+J-1);
  12. %              END
  13. %          END
  14. %     FOR S = 1.0: -0.1: 0.0, END steps S with increments of -0.1
  15. %     FOR E = EYE(N), ... END  sets E to the unit N-vectors.
  16.  
  17. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  18. %    Built-in function.
  19.