There are several different data types in Matlab which you will run across. The basic ones are listed below, though several additional ones can be found by visiting the help page at Mathworks.

Data Type | Matlab Class Name | Explanation | Example |
---|---|---|---|

Floating-Point Numbers | Single, Double | This is the default data type in Matlab. They are used to store real numbers. | A = 1.25125 |

Integers | int8, uint8, int16, uint16, int32, uint32, int64, uint64 | This data type is more memory efficient and allows for storage of whole numbers. "u" stands for unsigned integers while "8,16,32,64" stand for the number of bits for storage. | A = uint16(256) |

Characters and Strings | char | Used to store text. A string is an array of characters while char signifies each one. | A = 'Hello World' |

Boolean | logical | Used to store true (1) or false (0). | A = true; |

Structures | struct | Used to store varying lengths and types of data. The data is accessed using a name. | A = struct('Name', {'Vince','Matt'},'Wonderlic Score',[6 35]); |

Cell Arrays | cell | Used to store varying lengths and types of data. The data is accessed using an index. | A = cell(2) |