02_MATLABEnv - Introduction to MATLAB Environment ENCMP 100...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to MATLAB Environment
Background image of page 1

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

View Full DocumentRight Arrow Icon
ENCMP 100 2 ©2011 by ECE, UofA MATLAB Environment When MATLAB executes, it display several windows that accept commands or display information. Three most important ones are: Command Windows where commands are entered Figure Windows which display plots and graphs Edit Windows which permit a user to create and modify programs MATLAB Desktop
Background image of page 2
ENCMP 100 3 ©2011 by ECE, UofA MATLAB Desktop The windows initially "anchored" to MATLAB’s special window called desktop are: Command Window Command History Window Other MATLAB windows will pop up on top of the MATLAB desktop in response to various commands: Edit Window Figure Window(s) Help Browser Window Path Browser Window MATLAB Desktop
Background image of page 3

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

View Full DocumentRight Arrow Icon
ENCMP 100 4 ©2011 by ECE, UofA MATLAB Desktop MATLAB Desktop
Background image of page 4
ENCMP 100 5 ©2011 by ECE, UofA MATLAB Command Window Commands are typed after the >> prompt, and then followed by typing the ENTER key. The command is then executed immediately. MATLAB Desktop
Background image of page 5

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

View Full DocumentRight Arrow Icon
ENCMP 100 6 ©2011 by ECE, UofA MATLAB as Calculator In its simplest form MATLAB can be used as a scratch pad – calculator – performing mathematical operations. The calculations are performed in the Command Window, using symbols +, -, *, /, and ^ for addition, subtraction, multiplication, division, and exponentiation, respectively. After an expression is typed, the results will be automatically calculated and displayed. MATLAB Desktop
Background image of page 6
ENCMP 100 7 ©2011 by ECE, UofA MATLAB as Calculator MATLAB Desktop
Background image of page 7

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

View Full DocumentRight Arrow Icon
ENCMP 100 8 ©2011 by ECE, UofA MATLAB Ellipsis (. ..) extends commands across lines MATLAB Desktop
Background image of page 8
ENCMP 100 9 ©2011 by ECE, UofA Basics of Programming Variables and Constants MATLAB Desktop variable a symbolic name associated with a value and whose associated value may be changed, a variable can represent any kind of data that can be stored in a computer system, from simple True/False to numbers, names, pictures, sounds for example: area, radius constant a special kind of variable whose value cannot typically be altered by the program during its execution for example: pi
Background image of page 9

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

View Full DocumentRight Arrow Icon
ENCMP 100 10 ©2011 by ECE, UofA Basics of Programming Expressions and Assignments MATLAB Desktop expression is a combination of explicit values, constants, variables, and functions which computes and then produces another value for example: 2+3 is an arithmetic expression which evaluates to 5; a relational expression 4==4 evaluates to true assignment a statement where a value on the right side is assigned to a variable on the left variable = expression
Background image of page 10
ENCMP 100 11 ©2011 by ECE, UofA Basics of Programming Arithmetic Functions of Variables Addition : a + b Subtraction : a - b Multiplication : a * b Division : a / b Exponentiation : a ^ b These functions can be used to construct expressions involving constants and/or variables that can be assigned to variables. >> sum = 8 + 1;
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 43

02_MATLABEnv - Introduction to MATLAB Environment ENCMP 100...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online