To create a logical array of zeros of length 12 in Matlab, use the logical
function together with the zeros
function as follows:
main.m39 chars2 lines
This creates a row vector of length 12 containing only zeros, and then converts it to a logical array using the logical
function. The resulting logical array myLogicalArray
will have dimensions 1x12
.
gistlibby LogSnag