Matlab Functions List

Rmk

  • ~~Only functions referenced in my notes are listed.~~
  • Functions without a dedicated note are those that
    • have a single syntax with nothing else worth saying,
    • duplicate the usage of another function, or
    • are rarely used
      • For these, only the most basic syntax is kept.
  • Symbols
    • ... denotes variable-length argument omission
    • __ repeats the preceding syntax
    • <> marks an optional argument with a default value
    • <[]> means the brackets [] may be omitted, i.e. the argument may be either a variable-length list or an array

Basics

Mathematics

  • Matlab Random Number Generation
  • round(a): nearest integer to a; break ties by rounding away from zero
  • fix(a): nearest integer to a toward
  • floor(a): nearest integer to a toward
  • ceil(a): nearest integer to a toward
  • real(z): real part of complex number z
  • imag(z): imaginary part of complex number z
  • abs(z): absolute or modulus
  • angle(z): phase angle in radians, in the range
  • conj(z): conjugate of complex number z
  • complex(a,b): complex number with real part a and imaginary part b

Matrix Manipulation

Data Type Construction

Identity Test

  • Any function that starts with is returns a logical value indicating whether the tested variable satisfies a certain condition
  • Without special comment, the syntax is iscond(a), which returns 1 if the condition cond is satisfied by variable a, and 0 otherwise
  • isa(var,type) tests if var is of type type
  • isnumeric
  • isfloat
  • isstruct
  • islogical
  • ischar
  • iscell
  • iscellstr tests if input is a cell array of strings
  • isnan
  • isinf
  • isfinite
  • isinteger
  • isreal
  • isscalar
  • isvector
  • issparse
  • isspace
  • isempty
  • isdir
  • iskeyword
  • isvarname tests if the input is a valid variable name
  • isglobal
  • ismember(var,set) tests if var is a member of set
  • isequal(a,b,...) tests if all inputs are equal
  • isequalwithequalnans(a,b,...) tests if all inputs are equal, treating NaN values as equal
  • issorted
  • isfield(struct,field) tests if struct has a field named field