lectures‎ > ‎

lecture 01

Wed 1/19/2011

Overview of the class
  • go over learning objectives
  • go over syllabus and course requirements
  • discuss Matlab vs Octave
Here is a link to a screen recording of lecture 1
(or try this)

Downloading and installing Octave

Evaluating arithmetic expressions using Octave/Matlab
  • commenting using %
  • semicolons suppress output
  • clc to clear
  • arithmetic operators (+-*/^)
  • precedence and associativity and parentheses
  • display formats (short, long, short e, long e, short g, long g, bank, compact, loose)
  • builtin functions (sqrt, nthroot, exp, abs, log, log10, factorial, sin, cos, ...)
  • here is a link to all of the builtin arithmetic functions
Assignment of values to variables
  • assignment and variables (start with letter, alphanumeric, 63 chars max, case sensitive, no spaces, no builtins)
  • keywords and predefined values
  • who/whos to see defined variables
Script files
  • use pwd to find current directory and cd to change and "cd .." to go up one directory
  • store scripts in a file that ends with ".m"
  • writing name of script in command window invokes the commands in the script as if you typed them directly in
Homework 1 is to write a script file to solve all problems at the end of Chapter 1 and to hand in the script file and the output file from running the script, both as text files uploaded to Latte

Script files

Homework 1