MATLAB (**mat**rix **lab**oratory) is a proprietary programming language and numerical computing environment specifically built around matrix manipulation.

The application is built around the MATLAB scripting language. Common usage of the involves the Command Window as an interactive mathematical shell or executing text files containing MATLAB code.

### Purpose

The MATLAB language and environment is used for solving problems with data analyses and visualization.

### Procedure

Enter data into MATLAB manually in the command window or by importing files. Use math or array operators, conditional loops, or call built-in functions to perform operations such as data manipulation and statistical analyses. Use other scripts and functions to plot data in desired visualization. Save commands, data, and results in files.

### Sample Code

>> a=1

a=1

>> b=2

b=2 >>

c=a+b

c=3

```
```>> load(‘auto_data.mat’)

% get mpg from data matrix column 2

>> mpg = data(:,2)

mpg =

22

17

26

25

19

>> min=min(mpg)

min = 17

>> max=max(mpg)

max = 26

>>mean=mean(mpg)

mean = 21.80

`>> histogram(mpg)`

### References

Wikipedia: MATLAB

Mathworks: Matlab Statistics Toolbox overview

Matlab for basic tutorial [PDF]

MATLAB Website -http://www.mathworks.com/products/matlab/index.html

Wikipedia – https://en.wikipedia.org/wiki/MATLAB

Mark S. Gockenbach, A Practical Introduction to Matlab, http://www.math.mtu.edu/~msgocken/intro/intro.html