math245lab01 - Math245 Lab set#1 Fall 2008 Introduction to...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Math245 Lab set #1 Fall 2008 Page 1 Introduction to Matlab Basics 1 Matlab desktop 1. Variable assignment and arithmetic operations You can create any variables by assigning values to it in the form: (your variable name ) = (expression) General rule here is the notation " = " is NOT the same as the mathematical equality. " = " is called assignment operator. Your specified (expression) in rhs is assigned to (your specified variable name). Like using your calculators, you can do arithmetic operations by using arithmetic operators, i.e., + : addition, - : subtraction, * : multiplication, / : division, and ^ : exponentation. You can also use standard mathematical functions (e.g., sin, cos, exp, tanh, etc.) provided in Matlab package. Example 1: a = 1.0 a = 1 Command window (you put matlab command in here) Command history window (shows history of command) File list of current working directory Current working directory
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon