chapter 8 Flashcards
branching
executes list of statements based on logical expression
binary operators
use parentheses to make order of operations more explicit
any(x)
true if x is not zero
isnan(x)
true if x is NaN
isfinite(x)
true if x is finite
isinf(x)
true if x is inf or -inf
logical operators with arrays
element wise, returns array of 0s and 1d based on if it meets argument
logical indexing
extract elements from array with logical array
logical array
array of 1s and 0s based on if elements are T or F
loops
execute statements between keywords repeatedly based on given conditions
tic
starts internal timer
toc
returns time in seconds since ic
ones(n,m)
created array of specific size filled with ones
zeros(n,m)
creates array of specific size filled with zeros
local functions
functions only accessible in current script/workspace, defined after main function