To create an empty row matrix in Matlab, you can use the zeros
or ones
function depending on whether you want an all-zero or all-one matrix:
main.m143 chars6 lines
In both cases, n
is the number of columns in the matrix. The first argument of the zeros
and ones
function is the number of rows, which is 1 in this case.
gistlibby LogSnag