Week 1 – Introduction to MATLAB & Computational Thinking

Learning Outcomes By the end of this week, students will be able to:

  1. Install & navigate the MATLAB desktop, command window, and editor.
  2. Create and run scripts and functions and understand differences vs. command window.
  3. Create, manipulate and understand differences between scalars, vectors and matrices.
  4. Navigate the workspace.
  5. Perform basic operations and plotting in MATLAB.
  6. Use MATLAB’s help and documentation.

Suggested Readings

In-Class Activities

  • Tour of MATLAB interface: Command Window, Workspace, Editor.
  • Create a script week1_intro.m that:
    • generates and plot a simple production function $y=k^{\alpha}$
    • Defines variables, vectors and matrices.
    • Performs arithmetics.
    • Produces simple plots.
  • Use help, doc, and lookfor to find function descriptions.
  • Save workspace and reload it.
  • Save and run scripts.
  • Save and load data.

Homework / Practice

  • Create a script that calculates GDP deflator and inflation given nominal and real GDP and series.
  • Compute real GDP growth.
  • Explore plotting.

Files