Notes 00: Introduction to MATLAB


What is MATLAB?

MATLAB is a widely used software for implementing scientific and engineering computations. It connects a variety of capabilities and software libraries through a single unified interface, and is fully programmable through the MATLAB scripting language.

A quick demo

We'll dive into using MATLAB next time, but I didn't want to finish the first day without a simple example of what this software is capable of. You can download this demo file and open it with MATLAB by double clicking, or by opening it from within the MATLAB program itself. When you do so you'll see a short program broken into several sections (cells) that are differentiated by a double percent sign. Simpliy click on a cell to highlight it and type CTRL+Enter (hold down the CTRL control button and press the Enter key) to run the section of code contained within.

There are four sections which should:

  1. Demonstrate MATLAB's use as a calculator
  2. Sort and analyze a collection of data values
  3. Plot a population data set in Missouri
  4. Play a simple "guess the number" game

Don't worry about how these codes run today. For now you can just use this file as an example of the kinds of things we'll look at over this semester. You can also use this file as a test subject if you'd like to get MATLAB running in one of the labs or on your own computer.

Thanks, and welcome to Scientific Programming!