Array Creation and Concatenation

Create or combine scalars, vectors, matrices, or arrays


accumarray Construct array with accumulation
blkdiag Construct block diagonal matrix from input arguments
diag Create diagonal matrix or get diagonal elements of matrix
eye Identity matrix
false Logical 0 (false)
freqspace Frequency spacing for frequency response
linspace Generate linearly spaced vector
logspace Generate logarithmically spaced vectors
meshgrid Rectangular grid in 2-D and 3-D space
ndgrid Rectangular grid in N-D space
ones Create array of all ones
rand Uniformly distributed pseudorandom numbers
true Logical 1 (true)
zeros Create array of all zeros
cat Concatenate arrays along specified dimension
horzcat Concatenate arrays horizontally
vertcat Concatenate arrays vertically
Was this topic helpful?