Table of Contents

Introduction to Programming in Matlab

Introduction to Your Computer

 

Intro to Matlab: Matlab IDE, Scripts, & Functions

Required Matlab Settings

  • Go to Home tab –> Preferences –> Editor/Debugger –> Tab
    • Set Tab size: 2
    • Set Indent size: 2
    • Uncheck “Tab key inserts spaces” if it is checked.
    • Check “Emacs-style Tab key smart indenting”
  • Enter disp(tempdir()) in Matlab command window to find out your temporary directory. Make a note of the result.
  • Go to Home tab –> Preferences –> Editor/Debugger –> Backup Files
    • Set Location to “Single directory” and enter the path of your temporary directory.
  • Go to Editor tab –> click on the arrow underneath the Run icon –> make sure “Pause on Errors” is selected.
 

Vectors & Matrices

 

Vectorized Code, Logical Indexing, Basic Statistics

 

Selection Statements

 

While Loop

 

For Loops

 

Cells

 

Structs

 

Working with Data Files