﻿ ]>

## Matlab Overview

### Numeric Computing in Matlab

Matlab is a numeric computing environment. It is important to understand the difference between symbolic computing and numeric computing. In math classes and in Maple, the equation `x+y=3z` can be solved algebraically for any of the variables `x`, `y`, and `z` to get `x=3z-y` or `y=3z-x` or `z=(x+y)/3`, respectively. However, in a numeric computing environment such as Matlab, you do not enter equations to solve. Rather, you enter expressions to evaluate and then use those results in later parts of your work to compute new results. You can compute values of expressions and assign them to variable names similar to the way that you use a calculator. However, Matlab is much more sophisticated than your calculator and it can be used to implement and save problem solving steps that solve very complex problems. Let's start with a tour of Matlab's environment windows.

Matlab may take a while to start up and it may lock up if you attempt to work before it has finished loading, so wait until it has finished before trying to enter anything. Once Matlab has finished loading, you see multiple window tiles on the left, center, and right side of the screen. The location of the windows is customizable and may vary from that shown in our screen shots. But, you should be able to locate each of the following windows in your Matlab environment. The default view can be changed by you, the user. Before you make changes, let's review the windows:

### The Command Window

The Command Window is largest and takes up the main portion of the screen by default. This is where you can type any expressions (calculations) that you wish to evaluate. It works similar to a calculator except that the keyboard is used to enter the numbers and operators.

### The Current Folder Window

The Current Folder window is used to show in which directory (in your computer or network file system) you are currently working. It is important to know in which directory your work is being saved so that you can find it in future Matlab sessions. The current folder is also displayed in the tool bar above the Command Window.

### The Command History Window

The Command History window shows the most recently executed commands and can be used to repeat a command or to copy previously executed commands to the clipboard. Once commands have been copied to the clipboard, they may then be pasted into a program script or function definition file.

### The Workspace Window

The Workspace window may or may not be hidden by default depending upon your Matlab version. This window will show you which variable names have been assigned values and what those values are. Only variable names that have been previously defined can be used in expressions to evaluate results. This window is very useful when trying to debug program code.

### The File Editor Window

The file Editor window is another window that you will use throughout your work in Matlab. The Editor window is used to define your own formulas (functions) and to save lists of commands (program scripts) that can be run over and over.

The Editor window may not be showing when you first run Matlab. To see the Editor window, you will create or open an m-file. A later lesson describes how to do this.