To initialize a table/matrix in Matlab, you can do the following:
main.m148 chars6 lines
The first example creates a 3-by-3 matrix with random values using the rand
function. The second example initializes a matrix with specific values using brackets []
and separating rows with semicolons ;
.
gistlibby LogSnag