Chapter 2.1 &2.2

  1. What is an array?
    • *The fundamental unit of data in any Matlab program.
    • *A collection of data values organized into rows and columns.
  2. What is a Vector?
    An array with only one dimension.
  3. An array with two or more dimensions is a _______.
    Matrix
  4. How is the size of the array determined?
    It is specified by the number of rows and the number of columns in the array, (rows, columns).
  5. What is a variable?
    A region of memory containing an array, which is known by a user-specified name.
  6. The simplest way to initialize a variable is to assign it one or more values and is written as
    var = expression;
    is known as an_______.
    Assignment Statement
  7. All elements of an array are listed in _____ order.
    Row
  8. This expression creates a 1 x 1 array containing the value 3.4
    [3.4]
  9. This expression creates a 1 x 3 array containing the row vector [1 2 3].
    [1.0 2.0 3.0]
  10. This expression creates a 3 x 1 array containing the column vector
    [1
    2
    3]
    [1.0; 2.0; 3.0]
  11. This expression creates a 2 x 3 array containing the matrix
    [1 2 3
    4 5 6]
    [1, 2, 3; 4, 5, 6]
  12. This expression creates a 2 x 3 array containing the matrix
    [1 2 3
    4 5 6]
    • [1, 2, 3
    • 4, 5, 6]
  13. This expression creates an empty array, which contains no rows and no columns.
    [ ]
  14. Specifies a whole series of values by specifying the first value in the series, the stepping increment, and the last value in the series.
    Colon Operator
  15. The general form of a colon operator is _________.
    first:incr:last
  16. The first value is?
    The first value in the series.
  17. The incr value is?
    The stepping increment or increasing increment
  18. The last value is?
    The value in that it stops at.
  19. Evaluate
    x = 1:2:10
    • x=
    • 1 3 5 7 9
  20. Generates an n x n matrix of zeroes.
    zeros(n)
  21. Generates an m x n matrix of zeros.
    zeros(m,n)
  22. Generates a matrix of zeros of the same size as arr.
    zeros(size(arr))
  23. Generates an n x n matrix of ones.
    ones(n)
  24. Generates an m x n matrix of ones.
    ones(m,n)
  25. Generates a matrix of ones of the same size as arr.
    ones(size(arr))
  26. Generates an n x n identity matrix.
    eye(n)
  27. Generates an m x n identity matrix.
    eye(m,n)
  28. Returns the length of a vector, or the longest dimension of a 2-D array.
    length(arr)
  29. Returns two values specifying the number of rows and columns in arr.
    size(arr)
  30. _________ contains all on-diagonal elements are one, while all off diagnol elements are zero.
    Identity Matrix
Author
TiaRae
ID
36279
Card Set
Chapter 2.1 &2.2
Description
Chap 2.1&2.2 Matlab
Updated