Engr 6: Matlab Programming Engr 6 Matlab Lec 1 Intro Engr 6: Matlab Programming What is Matlab Course Goals Precedence Accounts & Login Variables Error Types Course Logistics Vince Bertsch Office: 1776 527-4621 vbertsch@santarosa.edu
What Does Matlab Do? Numerical Computations Visualization/Graphing Programmable (interpreted) Symbolic Equations Toolboxes for Engineering Graphical User Interfaces Data Acquisition Simulation & Design Signal Processing Image Processing Control Systems Fuzzy Logic Calculator Excel C++, Java, Assembly Mathematica, Maple Lab View, Logger Pro
Use care when applying goals. Course Goals Computer programming skills Computer as a tool for analysis & display Collaboration for efficient learning & skill building Matlab specific knowledge Goals may cause recurring problems due to narrowed focus and decreased intrinsic motivation. Use care when applying goals.
Scalar Operations & Precedence ( ) parentheses ^ power / * \ multiplication & division + - addition & subtraction Precedence Bingo Mark your 9 squares with numbers from 1 to 25 (no duplicates)
Accounts & Login Instructor will give each of you a unique login number, it’s the x. You will be prompted to make a new password (case sensitive). User: engr-x Pswd: x Dom: apptech
Variables Case sensitive 32 character max No spaces or math symbols *^-[.{;(%=@:... Avoid command names & predefined constants sin, exp, size, max, format, help NaN, pi, Inf, i, j, eps, ans, = is assignment operator (not the math symbol) >> VinHtInch = 6*12 + 6 >> y+5=6 syntax error Name returns the value >> VinHtCM = 2.54*VinHtInch
Error Types Syntax error Logical error Computer gives red error message Computer says, “I don’t understand.” Logical error Result happens, but is wrong User says, “That’s not what I meant.” >> VinHtInch = 6*10 + 6; >> VinHtCM = 2.54*VinHtinch ??? Undefined function or variable 'VinHtinch'.
Course Logistics Syllabus Schedule Labs Assignment #1 Reminder 1799 1751 1737 Assignment #1 Reminder