MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
Class Name Documentation Intended Use
logical “Logical
Operations”


  • Use in relational conditions or to test state.

  • Can have one of two values: true or false.

  • Also useful in array indexing.

  • Two-dimensional arrays can be sparse.
    function_hand
    le


“Function
Handles”


  • Pointer to a function.

  • Enables passing a function to another function

  • Can also call functions outside usual scope.

  • Use to specify graphics callback functions.

  • Save to MAT-file and restore later.
    table “Tables” • Rectangular container for mixed-type, column-oriented
    data.

  • Row and variable names identify contents.

  • Use the properties of a table to store metadata such as
    variable units.

  • Manipulation of elements similar to numeric or logical
    arrays.

  • Access data by numeric or named index.

  • Can select a subset of data and preserve the table
    container or can extract the data from a table.
    struct “Structures” • Fields store arrays of varying classes and sizes.

  • Access one or all fields/indices in single operation.

  • Field names identify contents.

  • Method of passing function arguments.

  • Use in comma-separated lists on page 2-78.

  • More memory required for overhead


3 Overview of MATLAB Classes

Free download pdf