## Specifying a Data Source

Creating the Graph First define two variables by issuing these statements in the command window. t = 0:.01:20; alpha =.055; Next plot t versus the expression exp(-alpha*t).*sin(.5*t) using the plot…

## Creating m-files in Matlab

Open an edit window where we can write the command lines. Click on the white sheet in the menu under File or simply write edit in the command window. Alternatively…

## Finding maximum and minimum values in arrays

Letâ€™s write a function file that calculates the difference between the maximum and minimum value in a vector. The file should return a reply. Open an edit window. Create a…

## Saving your Matlab sessions

Often one wants to save the data or variables to another occasion. Maybe one wants to save the whole Matlab session. This can be done. Commands are put in a…

## Examples of Expressions

You have already seen several examples of MATLAB expressions. Here are a few more examples, and the resulting values. rho = (1+sqrt(5))/2 rho = a = abs(3+4i) a = 5…