Programming | ![]() ![]() |
Scalars
Any individual real or complex number is represented in MATLAB as a 1-by-1 matrix called a scalar value:
A = 5; ndims(A) % Check number of dimensions in A ans = 2 size(A) % Check value of row and column dimensions ans = 1 1
Use the isscalar
function to tell if a variable holds a scalar value:
![]() | The Empty Matrix | Vectors | ![]() |
© 1994-2005 The MathWorks, Inc.