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
Array Related
Graphics Related
Mathematics
- Matlab Random Number Generation
round(a): nearest integer to a; break ties by rounding away from zerofix(a): nearest integer to a towardfloor(a): nearest integer to a towardceil(a): nearest integer to a towardreal(z): real part of complex number zimag(z): imaginary part of complex number zabs(z): absolute or modulusangle(z): phase angle in radians, in the rangeconj(z): conjugate of complex number zcomplex(a,b): complex number with real part a and imaginary part b
Matrix Manipulation
Data Type Construction
Identity Test
- Any function that starts with
isreturns a logical value indicating whether the tested variable satisfies a certain condition - Without special comment, the syntax is
iscond(a), which returns1if the conditioncondis satisfied by variablea, and0otherwise isa(var,type)tests ifvaris of typetypeisnumericisfloatisstructislogicalischariscelliscellstrtests if input is a cell array of stringsisnanisinfisfiniteisintegerisrealisscalarisvectorissparseisspaceisemptyisdiriskeywordisvarnametests if the input is a valid variable nameisglobalismember(var,set)tests ifvaris a member ofsetisequal(a,b,...)tests if all inputs are equalisequalwithequalnans(a,b,...)tests if all inputs are equal, treating NaN values as equalissortedisfield(struct,field)tests ifstructhas a field namedfield