80 likes | 190 Vues
MATLAB The Basics. CAPS – Sp12. Just a Fancy Calculator???. Many Uses. + Basic calculations - 2+2=4 + Ability to Save Calculations + Matrix Operations - Systems of Equations + Programming - Numerical Analysis - Robotics. Common Problems.
E N D
MATLAB The Basics CAPS – Sp12
Many Uses + Basic calculations - 2+2=4 + Ability to Save Calculations + Matrix Operations - Systems of Equations + Programming - Numerical Analysis - Robotics
Common Problems + Setting the Working Folder - Matlab will only look in one location for anything referenced + Spelling + Proper Form
Concerning Form + Precision is Key - Logic rules - Matlab can’t think for itself + Use Proper notation - Order of Operations - Consistency - Upward Looking
Useful Information + Prebuilt Functions - Trig: sin, cos, tan, sind, cosd, tand - Dot-operator + Matrices - Brackets, Commas, Semi-colons, Spaces - Matrix algebra - Matrix Functions * sum, max, min, sort, etc.
Functions • Created for specific tasks designed for repeatable tasks reference in other scripts/functions • Notation is important (Who would have guessed?) + Header function output = name(input) + Description comment directly below the header
‘If’ statements • Conditional commands • Input must be evaluated as True or False • Operates on an if-then basis • Also can use ‘elseif’ and ‘else’ for sequential decisional processing