December 2002
Intermediate to advanced
800 pages
18h 7m
English
We can view the variables currently in the Workspace by typing
» who Your variables are: ans x y z leaving 621420 bytes of memory free.
More detail about the size of the matrices can be obtained by typing whos.
We can find the size of a matrix or vector by typing
» [m,n]=size(x)
m =
1
n =
6
where m represents the number of rows and n represents the number of columns.
If we do not put place arguments for the rows and columns, we find
» size(x)
ans =
1 6
Since x is a vector, we can also use the length command
» length(x)
ans =
6
It should be noted that MATLAB is case sensitive with respect to variable names. An X matrix can coexist with an x matrix.
Sometimes it is desirable to clear all of the variables in a ...
Read now
Unlock full access