SUNY Geneseo Department of Mathematics
Wednesday, January 18
Math 230 02
Spring 2017
Prof. Doug Baldwin
(No Previous Lecture)
Math 230, Programming and Mathematical Problem Solving
I’m Doug Baldwin
Overloads
Key points from syllabus
Materials for this course are online via Canvas
Matlab as an interactive command interpreter
diary
logs session into a file
diary off
stops logginghelp
prints information about operations or commandsformat
controls how output appears
format compact
to single-space outputformat long
to print numbers to 15 digitsclc
clears transcript in command window (but not in diary files)quit
to shut Matlab downHere is the diary file for the demonstration I did in class.
Note that the last example, 3.14 + 8 = 11.140000000000001 demonstrates “round-off error,” the fact that computers can’t represent all numbers exactly, and so sometimes deviate slightly from “true” values.
How the computer works to execute Matlab (or any other program)
Read sections 1.1 through 1.3