1| Basic MATLAB Operations

In this section, we focus on navigating MATLAB and using basic features. We will create script files (as m files) and save them for later use.

At the end of this section you should be able to:

  1. Manipulate the IDE by clearing screen, variables, and figures

  2. Use common built-in mathematical functions

  3. Evaluate mathematical expressions in Matlab

  4. Define and create scalar, vector, and matrix variables

  5. Assign value(s) to variables

  6. Understand how a script works

  7. Save a script as an m file

  8. Create basic plots and customize the look

Introduction

MATLAB Tour: explore the basic layout and operation of MATLAB.

Calculator Functions: how to use MATLAB to calculate simple expressions

Vectors & Matrices

Using Vectors: utilizing MATLAB’s powerful vector abilities.

Using Matrices: utilizing MATLAB’s powerful matrix abilities. Though we will not use them in this course, I show how to compute eigenvalues of a matrix.

Scripts

Making Scripts and m files: creating and saving scripts (a sequence of commands) as an m file for later use.

Plotting

Plotting: using MATLAB’s built-in ability to produce graphics. We will be using plot, polarplot, loglog, semilogx and semilogy in this course among others.

More Functions: a few more functions built into MATLAB including max, min and ginput.

  1. If , find the maximum value of and at what value of at which the maximum occurs.

  2. Sum the multiples of 3 from 3 to 63.

Lecture Code

More Nerd Stuff

Deeper explanation of how code works to give computer instructions