6.2) Data Types
- Every variable defined within Matlab is assigned to a data class according to its type.
- Each class has a corresponding kind of array (an array being the generalized form of a matrix).
- Matlab has 16 fundamental classes, as shown below:
- The classes covered in this course are char, numeric (mostly double), cell and structure.
- We have already come across variables of class double when we were doing simple calculations, as well as the char class when we introduced Matlab variables.
[matlab]
>> a=3;
>> b='hello world';
>> whos
Name Size Bytes Class
a 1x1 8 double
b 1x11 22 char
[/matlab]