# MATLAB PRIMER. Open Matlab from your Programs directory or by clicking on its icon.

Save this PDF as:

Size: px
Start display at page:

## Transcription

4 To assign a value to a variable (case sensitive), Matlab uses the equal sign. So to assign the value 10 to a and 20 to A, and then add them, write: >> a=10 a = 10 >> A=20 A = 20 >> A+a 30 If variables a and b have been assigned values, then we can compute a^2, and a*b, etc. Some of the standard functions available in Matlab are: sin asin (arcsin) exp (e) abs (absolute value) sqrt (square root) cos acos log (natural log) floor ceil tan atan The number is denoted by pi (lower case). The number e is obtained by entering exp(1). You can assign it to the variable e Note that the word log denotes natural log. Log 10 (base 10) of x would be computed by log(x)/log(10). b. Matlab allows you to create your own functions through M-files. First, go to File in the tool bar and click on NEW. Then select M-File. The Editor window will pop up blank. Say you want to form the function y = f(x) where f(x) = x 2 + x + 1. On the top line of the page write: function y = f(x) The first line tells Matlab that the M file contains the definition of a function, that the function s name is f, that it accepts one input x and yields one number y as its output. On the next line, give the recipe for the output y in terms of x: y = x.^2 + x + 1 (Note the period before the exponential operator. More on that later.) Now save the M-file, naming it f (or whatever your function s name is). function y = f(x) y = x.^2 + x + 1 4

5 Now in the Command window, enter f(2). The response will be 7. >> f(2) y = 7 7 Note: in the Command Window, the answer 7 is assigned to the temporary variable ans and y remains unassigned. To assign y the value 7, do: >> y =f(2) y = 7 y = 7 To plot a function, we need to set a domain and an increment that determines how many points are sampled for graphing. So to graph our function f on the domain -1 x 1 at an increment of 0.05, we proceed as follows. Don t forget the semicolon! >> x=[-1:.05:1]; >> y=f(x); >> plot(x,y) The first instruction establishes the domain x =[left endpoint: increment : right endpoint]. The resulting x is actually a vector of values. We compute the vector of y-values with the instruction y = f(x). (That is why we used.^ in the definition of the function. More later.) Then we instruct Matlab to plot. The plot appears in a separate window. You can save it as name.fig. Look up the plot options with help plot Exercise Set 1 for parts I and II. 1. Turn on Matlab. Pull down the Desktop tab. Make it so that you only view the Command window. Then return to the default layout. 5

6 2. Perform the following calculations. Answers should display four decimal places. 3 i. Compute 5 ii. Assign the value e to the variable a and then compute a 2. iii. Bring back the previous command to the prompt >> using the up arrow and assign the value obtained in part ii to the value b. Then compute b 2 2. iv. Compute ln(10) and log 10 (1000) 3. Assign the vector [2 3 4] to the variable v and the vector [-1 0 ½] to the vector t. Compute v*w. (You should get an error message.) Now compute v.* w and v.^w. What s the difference? 4. Make a function called fred where if y = fred (x), then y = x 3 x. Plot fred on the interval x from -2 to +2 with increments of Then edit fred so that y = x 3 + x and replot. Remember to save fred. Using M-Files: 5. Close Matlab and reopen. This time, we will do most of our work in an M file. So open a new M-File. (Go to File, New, M File.) When the Editor pops up, the first thing to do is to save the document. I like to use something like Session(Date) or a short temporary nickname like today. Instead of working in the Command Window, work in the M file so that you can edit much more easily and have a permanent record of your session that can be reactivated. A typical small M File might look like the following: 1- format short 2- format compact 3- clear 4- a=sin(pi/6) 5- b=cos(pi/15) You edit it just as you would a word document. If you want to check you corrections and edits, save the document and then type its name in the Command Window. The command sequence will be executed. Your job: make and M File and do some computations with it. Experiment!!!!! III. Matrices and Vectors. Matlab is short for Matrix Lab. It s all about matrices. Every function and/or operation is performed on matrices, whether you know it or not. Mostly, you know it! 6

7 So this is a brief introduction to the most important part of Matlab. It is just the tip of the iceberg. a. Forming matrices and learning about them First we enter the matrix >> A=[2 5 3;5 9 0] A = and assign it to the variable A. The entries are separated by the space bar (or by commas) and the rows are separated by the semicolon. Note that when it responds, Matlab omits the brackets. The transpose of a matrix interchanges row and columns. The transpose of A is A. >> A' So to obtain A, you could alternatively have entered: >> B=[2 5; 5 9; 3 0] B = A=B' A = Now let s find out about A and B. i. To obtain the dimensions of A, use size(a): >> size(a) 2 3 Matlab returns a vector [rows of A, columns of A]. ii. To obtain the element in the ith row and jth column of A, use A(i, j). For instance, A(1, 2) gets the entry in the first row, second column of A. 7

8 >> A(1, 2) 5 We can access the row and column sizes of A as follows by assigning size to a variable. The variable will be a vector i.e. a 1 2 matrix. We can then extract the components. >> s=size(a) s = 2 3 >> s(1) 2 iii. The magic colon : is one of Matlab s most versatile features!!!!!! Alone, colon means all. So A(2, :) returns the second row and all the columns. >> A(2,:) When you see i : j, the colon means all entries from the i th to the j th entry. So A(1,1:2) will extract the entries from the 1 st to the 2 nd column in the first row. >> A(1,1:2) 2 5 When you see i:m:j, the middle term m is the increment. So A(1, 1:2:3) will return the 1 st and 3 rd entries in the first row because we will skip by 2 s. >> A(1, 1:2:3) 2 3 Using a increment of -1 will list elements in reverse order. So A(1, 3:-1:1) lists the first row of A in reverse order. >> A(1, 3:-1:1)

9 We can build new matrices from parts of old matrices. >> C=A(1:2,2:3) C = The empty matrix is denoted by [], a bracket pair with nothing in it. When you set something equal to [], it gets deleted and causes the matrix to collapse to what remains. In the following, we create a 33 matrix M by using the command rand(3) which creates a 33 with random entries between 0 and 1. (Go to the help menu to find out more.) We then delete its bottom row. >> M=rand(3) by setting the bottow row M(3, :) equal to [ ]. M = >> M(3,:)=[] M =

10 Example: Row operations We will perform some row operations on the matrix A: i. First we swap rows 1 and 2. The trick is to first assign those rows to vectors x1 and x2 and then replace the rows of A. >> x1=a(1,:) x1 = >> x2=a(2,:) x2 = >> A(1,:)=x2 A = >> A(2,:)=x1 A = ii. Now we multiply the new first row 1 by ½: >> A(1,:) = 1/2*A(1,:) A = iii. Now we replace row 3 by row 3-3*row(1). >> A(3,:)=A(3,:)-3*(A(1,:)) A3 =

11 Other ways to build matrices and vectors. i. We can use the colon to produce a row vector of equally spaced numbers and then use the transpose to get a column vector. >> x = (3:2:9) x = >> x=(3:2:9)' x = ii. We can join appropriately sized matrices and vectors. In the next example, we augment a 32 matrix A with a column vector. >> A=[1 2;2 3;5 6] A = >> b=[2-1 0]' b = >> C=[A,b] C = Now add a row to the bottom of A. Note the use of the semicolon versus the comma. >> r=[11,12] r = >> D=[A;r] D =

12 The command rand(m,n) will produce a matrix of the indicated size with random entries. Use the help menu to see how to control the entries. >> rand(3,4) The command eye(n) produces the nn identity matrix. (Sorry about the pun!) >> eye(2) The command diag is a bit tricky. If you have a matrix, it will extract its diagonal a put it into a column vector. >> a=rand(3) a = >> diag(a) If you have a vector, it will place it in the diagonal. >> diag([1 2 3]) The command does more. Please refer to the help menu. The command zeros(m,n) produces an mn matrix with all zero entries. 12

13 >> zeros(2,3) IV. Matrix Operations. We add, subtract and multiply by constants as you would expect. So let a = b = Then: >> 5*a >> a+b Since a and b have compatible sizes, we can multiply them: >> b*a Since a is square, we can find its determinant and, if it is not 0, we can find the inverse of a: > det(a) -6 >> inv(a) 0 1/2 1/3-1/6 If we let x = [ 1, -1], and try to multiply a*x, we get an error message because x is a row vector. So we take its transpose: >> x=[1-1] 13

14 x = 1-1 >> a*x??? Error using ==> mtimes Inner matrix dimensions must agree. The last phrases were Matlab s error message. We couldn t multiply because the dimensions were not compatible. So let s correct it. >> a*x' -2 2 But we can multiply on the right: >> x*a -1 3 We can raise square matrices to various powers: >> a^ Component wise operations: When preceded by a period, operations like * and ^ behave component wise. For instance, multiplies a(1,1) by b(1,1), etc. and a. ^ b will raise a(1,1) to the b(1,1) power. > a.* b >> a.^b Additional Matrix commands: The ULTIMATE matrix command: rref (reduced row echelon form) >> rref(a) Other commands: rank (m) computes the rank of a matrix 14

15 norm(v) computes the norm of a vector v dot(v,w) computes the dot product of two vectors. Exercise Set 2 1. Enter the following matrices A 1 3 9, B i. Display the entries A 2,3 and B 3,2. ii. Set b equal to the second column of B. iii. Set c = to the third row of A. iv. Set C = A b i.e. A augmented with b. v. Set x equal to the transpose of the first column of B. vi. Set D equal to the matrix A with the row x adjoined at the bottom. vii. Set A1 equal to the matrix A with the last column deleted. (Recall that [] is the empty matrix.) 2. Use the matrices found in exercise 1 to compute the following: i. A* B ii. b + c ( c denotes the transpose of c.) iii. B * A iv. A 4 v. A -1 (if possible!) 3. i. Use diag to construct a matrix with diagonal [1, -1, 2, 5, 6] ii. Use rand to create a 5 6 matrix with entries between 0 and 5. iii. Use zeros to create a vector with 6 entries, all zero. iv. Use eye to create a 66 identity matrix Let A2 1 5 and B i. Compute A2*B2. ii. Multiply component-wise using.* iii. Raise each entry in A2 to the corresponding power in B2. 15

16 4x 3y 2z w 5 5. Solve the system 2x y 3z 7 by augmenting the coefficient matrix by the x 4y z 2w 8 0 column of constants and using rref. Repeat the problem using 0 as the column of 0 constants. V. Basic Programming. The three basic programming tools are the for statement, the while statements, and the if else end statements. i. We use the for statements when we know how many times we want our program to loop. The format is as follows: for x = array end commands The commands are executed once for each column in the array. At each step, x moves to the next value in the array. In the next example, we add together every third number numbers from 1 to 34 to obtain the sum s = The array will be denoted 1:3:34. First we initialize the variable s. At each step we add the value of x to the sum s. Note: the use of semicolons suppresses the view of values--a good thing for long programs! So we ask for the value of s after the program is executed. >> s=0; >> for x=1:3:34 s=s+x; end >> s s = 210 ii. The while statement executes commands while a condition is true. Its format is as follows: 16

17 while expression commands end In the next example, we add the values subsequent numbers until the addition of the last numbers makes the sum reach 2000 or more. Note the initialization. The last number to be added is 63. Before adding 63, the sum had not reached >> s=0;i=0; >> while s <2000 i=i+1; s=s+i; end >> s s = 2016 >> i i = 63 iii. The if statement executes a statement if a condition is true and allows alternatives in other cases. It can have various formats. if expression command executed if expression true end OR if expression command executed if expression true else command executed if expression false end OR if expression 1 command executed if expression1 true elseif expression 2 command executed if expression 2 true elseif else command if none of the other expressions are true 17

18 end In the following example, we will generate 100 random numbers between 0 and 1 and find out how many of them have squares greater than 0.5 and how many do not. (Okay, so there are lots of better ways to do this.) But the outcome of the program will change every time it is executed. Noted that in this program the if statement is nested in a for state. Each needs its own end. Also note that the script is how the program appears in an M-file. The file is saved to the Matlab Work folder under the silly name iffy. To execute it, I just type iffy in the Command Window and then ask for m and j, which are the number of times the square is greater than or and less than 0>5 respectively. Here s the M-file program m=0;j=0;k=100 %k is the number of samples, m is how many squares are above.5 and j is %how many are below. for i=1:k x=rand; if x^2 >.5 m=m+1; else j=j+1; end end m j Here s what I write in the Command window and what Matlab returns. >> iffy k = 100 m = 28 j = 72 That s all for now! 18

### AMATH 352 Lecture 3 MATLAB Tutorial Starting MATLAB Entering Variables

AMATH 352 Lecture 3 MATLAB Tutorial MATLAB (short for MATrix LABoratory) is a very useful piece of software for numerical analysis. It provides an environment for computation and the visualization. Learning

### 2+2 Just type and press enter and the answer comes up ans = 4

Demonstration Red text = commands entered in the command window Black text = Matlab responses Blue text = comments 2+2 Just type and press enter and the answer comes up 4 sin(4)^2.5728 The elementary functions

### SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections

### b) lower case always use lower case for all matlab commands. This is what matlab recognizes.

1 Matlab 1) Fundamentals a) Getting Help for more detailed help on any topic, typing help, then a space, and then the matlab command brings up a detailed page on the command or topic. For really difficult

### Beginner s Matlab Tutorial

Christopher Lum lum@u.washington.edu Introduction Beginner s Matlab Tutorial This document is designed to act as a tutorial for an individual who has had no prior experience with Matlab. For any questions

### Command lookfor followed by a key word (which can be anything and not only a command) gives help related to the key word.

1 Using MatLab Help Command help provides a short description of all functions. For example, to get help on the diary command, type help diary. For more information type help -i diary. Command lookfor

### MATLAB Basics MATLAB numbers and numeric formats

MATLAB Basics MATLAB numbers and numeric formats All numerical variables are stored in MATLAB in double precision floating-point form. (In fact it is possible to force some variables to be of other types

### Texas Instruments TI-83, TI-83 Plus Graphics Calculator I.1 Systems of Linear Equations

Part I: Texas Instruments TI-83, TI-83 Plus Graphics Calculator I.1 Systems of Linear Equations I.1.1 Basics: Press the ON key to begin using your TI-83 calculator. If you need to adjust the display contrast,

### Introduction to Matlab

Introduction to Matlab Social Science Research Lab American University, Washington, D.C. Web. www.american.edu/provost/ctrl/pclabs.cfm Tel. x3862 Email. SSRL@American.edu Course Objective This course provides

### u = [ 2 4 5] has one row with three components (a 3 v = [2 4 5] has three rows separated by semicolons (a 3 w = 2:5 generates the row vector w = [ 2 3

MATLAB Tutorial You need a small numb e r of basic commands to start using MATLAB. This short tutorial describes those fundamental commands. You need to create vectors and matrices, to change them, and

### MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

### 4. MATRICES Matrices

4. MATRICES 170 4. Matrices 4.1. Definitions. Definition 4.1.1. A matrix is a rectangular array of numbers. A matrix with m rows and n columns is said to have dimension m n and may be represented as follows:

### Helpsheet. Giblin Eunson Library MATRIX ALGEBRA. library.unimelb.edu.au/libraries/bee. Use this sheet to help you:

Helpsheet Giblin Eunson Library ATRIX ALGEBRA Use this sheet to help you: Understand the basic concepts and definitions of matrix algebra Express a set of linear equations in matrix notation Evaluate determinants

### MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

### Linear Algebra Notes for Marsden and Tromba Vector Calculus

Linear Algebra Notes for Marsden and Tromba Vector Calculus n-dimensional Euclidean Space and Matrices Definition of n space As was learned in Math b, a point in Euclidean three space can be thought of

### TI-83 Plus Graphing Calculator Keystroke Guide

TI-83 Plus Graphing Calculator Keystroke Guide In your textbook you will notice that on some pages a key-shaped icon appears next to a brief description of a feature on your graphing calculator. In this

### Matrix Algebra and Applications

Matrix Algebra and Applications Dudley Cooke Trinity College Dublin Dudley Cooke (Trinity College Dublin) Matrix Algebra and Applications 1 / 49 EC2040 Topic 2 - Matrices and Matrix Algebra Reading 1 Chapters

### Texas Instruments TI-92 Graphics Calculator Systems of Linear Equations

Part IV: IV.1 Texas Instruments TI-92 Graphics Calculator Systems of Linear Equations IV.1.1 Basics: Press the ON key to begin using your TI-92 calculator. If you need to adjust the display contrast, first

### a(1) = first.entry of a

Lecture 2 vectors and matrices ROW VECTORS Enter the following in SciLab: [1,2,3] scilab notation for row vectors [8]==8 a=[2 3 4] separate entries with spaces or commas b=[10,10,10] a+b, b-a add, subtract

### How long is the vector? >> length(x) >> d=size(x) % What are the entries in the matrix d?

MATLAB : A TUTORIAL 1. Creating vectors..................................... 2 2. Evaluating functions y = f(x), manipulating vectors. 4 3. Plotting............................................ 5 4. Miscellaneous

### 2.5 Elementary Row Operations and the Determinant

2.5 Elementary Row Operations and the Determinant Recall: Let A be a 2 2 matrtix : A = a b. The determinant of A, denoted by det(a) c d or A, is the number ad bc. So for example if A = 2 4, det(a) = 2(5)

### Lecture 2 Matrix Operations

Lecture 2 Matrix Operations transpose, sum & difference, scalar multiplication matrix multiplication, matrix-vector product matrix inverse 2 1 Matrix transpose transpose of m n matrix A, denoted A T or

### B such that AB = I and BA = I. (We say B is an inverse of A.) Definition A square matrix A is invertible (or nonsingular) if matrix

Matrix inverses Recall... Definition A square matrix A is invertible (or nonsingular) if matrix B such that AB = and BA =. (We say B is an inverse of A.) Remark Not all square matrices are invertible.

### Linear Algebra and TI 89

Linear Algebra and TI 89 Abdul Hassen and Jay Schiffman This short manual is a quick guide to the use of TI89 for Linear Algebra. We do this in two sections. In the first section, we will go over the editing

### TI-86 Graphing Calculator Keystroke Guide

TI-86 Graphing Calculator Keystroke Guide In your textbook you will notice that on some pages a key-shaped icon appears next to a brief description of a feature on your graphing calculator. In this guide

### December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation

### Notes on Determinant

ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without

### TI-92 GRAPHING CALCULATOR BASIC OPERATIONS

TI-92 GRAPHING CALCULATOR BASIC OPERATIONS by Carolyn Meitler Concordia University Wisconsin B-1 Getting Started Press ON to turn on the calculator. Press 2nd 6 to get the MEMORY screen (shown at the right).

### Introduction to Matrix Algebra I

Appendix A Introduction to Matrix Algebra I Today we will begin the course with a discussion of matrix algebra. Why are we studying this? We will use matrix algebra to derive the linear regression model

### The Inverse of a Matrix

The Inverse of a Matrix 7.4 Introduction In number arithmetic every number a ( 0) has a reciprocal b written as a or such that a ba = ab =. Some, but not all, square matrices have inverses. If a square

### Lecture Notes 2: Matrices as Systems of Linear Equations

2: Matrices as Systems of Linear Equations 33A Linear Algebra, Puck Rombach Last updated: April 13, 2016 Systems of Linear Equations Systems of linear equations can represent many things You have probably

### Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Matrix Algebra A. Doerr Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Some Basic Matrix Laws Assume the orders of the matrices are such that

### MAT 275 Laboratory 1 Introduction to MATLAB

MAT 275 Laboratory 1 Introduction to MATLAB MATLAB is a computer software commonly used in both education and industry to solve a wide range of problems. This Laboratory provides a brief introduction to

### (!' ) "' # "*# "!(!' +,

MATLAB is a numeric computation software for engineering and scientific calculations. The name MATLAB stands for MATRIX LABORATORY. MATLAB is primarily a tool for matrix computations. It was developed

### Brief Introduction to Vectors and Matrices

CHAPTER 1 Brief Introduction to Vectors and Matrices In this chapter, we will discuss some needed concepts found in introductory course in linear algebra. We will introduce matrix, vector, vector-valued

### Matrices Worksheet. Adding the results together, using the matrices, gives

Matrices Worksheet This worksheet is designed to help you increase your confidence in handling MATRICES. This worksheet contains both theory and exercises which cover. Introduction. Order, Addition and

### Appendix: Tutorial Introduction to MATLAB

Resampling Stats in MATLAB 1 This document is an excerpt from Resampling Stats in MATLAB Daniel T. Kaplan Copyright (c) 1999 by Daniel T. Kaplan, All Rights Reserved This document differs from the published

### MATLAB Programming. Problem 1: Sequential

Division of Engineering Fundamentals, Copyright 1999 by J.C. Malzahn Kampe 1 / 21 MATLAB Programming When we use the phrase computer solution, it should be understood that a computer will only follow directions;

### Diagonal, Symmetric and Triangular Matrices

Contents 1 Diagonal, Symmetric Triangular Matrices 2 Diagonal Matrices 2.1 Products, Powers Inverses of Diagonal Matrices 2.1.1 Theorem (Powers of Matrices) 2.2 Multiplying Matrices on the Left Right by

### Solving a System of Equations

11 Solving a System of Equations 11-1 Introduction The previous chapter has shown how to solve an algebraic equation with one variable. However, sometimes there is more than one unknown that must be determined

Operators Lecture 2 Mathcad Basics + Addition, - Subtraction, * Multiplication, / Division, ^ Power ( ) Specify evaluation order Order of Operations ( ) ^ highest level, first priority * / next priority

### EXPERIMENT GRAPHING IN EXCEL

EXPERIMENT GRAPHING IN EXCEL Introduction In this lab you will learn how to use Microsoft Excel to plot and analyze data that you obtain while doing experiments. In this lab you learn how to Enter data

### Introduction to the TI-83/TI-83+ and TI-84+ for College Algebra.

Introduction to the TI-83/TI-83+ and TI-84+ for College Algebra. Turning it on and off: To turn the calculator on, press the ON key in the lower left corner. You should now see a flashing rectangle, the

### 13 MATH FACTS 101. 2 a = 1. 7. The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

3 MATH FACTS 0 3 MATH FACTS 3. Vectors 3.. Definition We use the overhead arrow to denote a column vector, i.e., a linear segment with a direction. For example, in three-space, we write a vector in terms

### The basic unit in matrix algebra is a matrix, generally expressed as: a 11 a 12. a 13 A = a 21 a 22 a 23

(copyright by Scott M Lynch, February 2003) Brief Matrix Algebra Review (Soc 504) Matrix algebra is a form of mathematics that allows compact notation for, and mathematical manipulation of, high-dimensional

### Introduction to Matrices for Engineers

Introduction to Matrices for Engineers C.T.J. Dodson, School of Mathematics, Manchester Universit 1 What is a Matrix? A matrix is a rectangular arra of elements, usuall numbers, e.g. 1 0-8 4 0-1 1 0 11

### Matrix Operations on a TI-83 Graphing Calculator

Matrix Operations on a TI-83 Graphing Calculator Christopher Carl Heckman Department of Mathematics and Statistics, Arizona State University checkman@math.asu.edu (This paper is based on a talk given in

### Operation Count; Numerical Linear Algebra

10 Operation Count; Numerical Linear Algebra 10.1 Introduction Many computations are limited simply by the sheer number of required additions, multiplications, or function evaluations. If floating-point

### Excel Basics By Tom Peters & Laura Spielman

Excel Basics By Tom Peters & Laura Spielman What is Excel? Microsoft Excel is a software program with spreadsheet format enabling the user to organize raw data, make tables and charts, graph and model

### 1 Introduction to Matrices

1 Introduction to Matrices In this section, important definitions and results from matrix algebra that are useful in regression analysis are introduced. While all statements below regarding the columns

### MATLAB Workshop 3 - Vectors in MATLAB

MATLAB: Workshop - Vectors in MATLAB page 1 MATLAB Workshop - Vectors in MATLAB Objectives: Learn about vector properties in MATLAB, methods to create row and column vectors, mathematical functions with

### Calculator Notes for the TI-Nspire and TI-Nspire CAS

CHAPTER 6 Calculator Notes for the Note 6A: Entering and Editing Matrices You will use the Calculator application to enter and edit matrices. Entering a Matrix Press c and choose Calculator. To access

### Exercise 4 Learning Python language fundamentals

Exercise 4 Learning Python language fundamentals Work with numbers Python can be used as a powerful calculator. Practicing math calculations in Python will help you not only perform these tasks, but also

### MATHEMATICS FOR ENGINEERS BASIC MATRIX THEORY TUTORIAL 2

MATHEMATICS FO ENGINEES BASIC MATIX THEOY TUTOIAL This is the second of two tutorials on matrix theory. On completion you should be able to do the following. Explain the general method for solving simultaneous

### Using row reduction to calculate the inverse and the determinant of a square matrix

Using row reduction to calculate the inverse and the determinant of a square matrix Notes for MATH 0290 Honors by Prof. Anna Vainchtein 1 Inverse of a square matrix An n n square matrix A is called invertible

### Matlab Tutorial Francesco Franco

Matlab Tutorial Francesco Franco Matlab is a software package that makes it easier for you to enter matrices and vectors, and manipulate them. The interface follows a language that is designed to look

### Excel Guide for Finite Mathematics and Applied Calculus

Excel Guide for Finite Mathematics and Applied Calculus Revathi Narasimhan Kean University A technology guide to accompany Mathematical Applications, 6 th Edition Applied Calculus, 2 nd Edition Calculus:

### DETERMINANTS. b 2. x 2

DETERMINANTS 1 Systems of two equations in two unknowns A system of two equations in two unknowns has the form a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 This can be written more concisely in

### FIRST STEPS WITH SCILAB

powered by FIRST STEPS WITH SCILAB The purpose of this tutorial is to get started using Scilab, by discovering the environment, the main features and some useful commands. Level This work is licensed under

### Introduction to Numerical Math and Matlab Programming

Introduction to Numerical Math and Matlab Programming Todd Young and Martin Mohlenkamp Department of Mathematics Ohio University Athens, OH 45701 young@math.ohiou.edu c 2009 - Todd Young and Martin Mohlenkamp.

### Using Casio Graphics Calculators

Using Casio Graphics Calculators (Some of this document is based on papers prepared by Donald Stover in January 2004.) This document summarizes calculation and programming operations with many contemporary

### Solution to Homework 2

Solution to Homework 2 Olena Bormashenko September 23, 2011 Section 1.4: 1(a)(b)(i)(k), 4, 5, 14; Section 1.5: 1(a)(b)(c)(d)(e)(n), 2(a)(c), 13, 16, 17, 18, 27 Section 1.4 1. Compute the following, if

### The Center for Teaching, Learning, & Technology

The Center for Teaching, Learning, & Technology Instructional Technology Workshops Microsoft Excel 2010 Formulas and Charts Albert Robinson / Delwar Sayeed Faculty and Staff Development Programs Colston

### MATLAB Functions. function [Out_1,Out_2,,Out_N] = function_name(in_1,in_2,,in_m)

MATLAB Functions What is a MATLAB function? A MATLAB function is a MATLAB program that performs a sequence of operations specified in a text file (called an m-file because it must be saved with a file

### Financial Econometrics MFE MATLAB Introduction. Kevin Sheppard University of Oxford

Financial Econometrics MFE MATLAB Introduction Kevin Sheppard University of Oxford October 21, 2013 2007-2013 Kevin Sheppard 2 Contents Introduction i 1 Getting Started 1 2 Basic Input and Operators 5

### Calculator Notes for the TI-89, TI-92 Plus, and Voyage 200

CHAPTER 6 Note 6A Entering and Editing Matrices You can enter a matrix into the Data/Matrix Editor or into the Home screen. Entering a Matrix into the Data/Matrix Editor a. Press APPS, open the Data/Matrix

### Summary of important mathematical operations and formulas (from first tutorial):

EXCEL Intermediate Tutorial Summary of important mathematical operations and formulas (from first tutorial): Operation Key Addition + Subtraction - Multiplication * Division / Exponential ^ To enter a

### Vector algebra Christian Miller CS Fall 2011

Vector algebra Christian Miller CS 354 - Fall 2011 Vector algebra A system commonly used to describe space Vectors, linear operators, tensors, etc. Used to build classical physics and the vast majority

### 2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

1. Systems of linear equations We are interested in the solutions to systems of linear equations. A linear equation is of the form 3x 5y + 2z + w = 3. The key thing is that we don t multiply the variables

### Lecture Notes: Matrix Inverse. 1 Inverse Definition

Lecture Notes: Matrix Inverse Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong taoyf@cse.cuhk.edu.hk Inverse Definition We use I to represent identity matrices,

### Beginning Matlab Exercises

Beginning Matlab Exercises R. J. Braun Department of Mathematical Sciences University of Delaware 1 Introduction This collection of exercises is inted to help you start learning Matlab. Matlab is a huge

### Quick Tour of Mathcad and Examples

Fall 6 Quick Tour of Mathcad and Examples Mathcad provides a unique and powerful way to work with equations, numbers, tests and graphs. Features Arithmetic Functions Plot functions Define you own variables

### Lecture 6. Inverse of Matrix

Lecture 6 Inverse of Matrix Recall that any linear system can be written as a matrix equation In one dimension case, ie, A is 1 1, then can be easily solved as A x b Ax b x b A 1 A b A 1 b provided that

### Preface of Excel Guide

Preface of Excel Guide The use of spreadsheets in a course designed primarily for business and social science majors can enhance the understanding of the underlying mathematical concepts. In addition,

### Simulation Tools. Python for MATLAB Users I. Claus Führer. Automn 2009. Claus Führer Simulation Tools Automn 2009 1 / 65

Simulation Tools Python for MATLAB Users I Claus Führer Automn 2009 Claus Führer Simulation Tools Automn 2009 1 / 65 1 Preface 2 Python vs Other Languages 3 Examples and Demo 4 Python Basics Basic Operations

### 18.06 Problem Set 4 Solution Due Wednesday, 11 March 2009 at 4 pm in 2-106. Total: 175 points.

806 Problem Set 4 Solution Due Wednesday, March 2009 at 4 pm in 2-06 Total: 75 points Problem : A is an m n matrix of rank r Suppose there are right-hand-sides b for which A x = b has no solution (a) What

### MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

Basic R Commands: Comments If you want to insert a comment (i.e., non-executable commands) anywhere in a program, you need to preface the line of code with a # sign. Everything in the line after the #

### TI-83 Plus GRAPHING CALCULATOR BASIC OPERATIONS. Carolyn Meitler Concordia University Wisconsin

TI-83 Plus GRAPHING CALCULATOR BASIC OPERATIONS by Carolyn Meitler Concordia University Wisconsin B-1 Getting Started Press ON to turn on the calculator. Press 2nd + to get the MEMORY screen (shown at

### Calculator Notes for the TI-89, TI-92 Plus, and Voyage 200

CHAPTER 1 Note 1A Reentry Calculator Notes for the TI-89, TI-92 Plus, and Voyage 200 If you want to do further calculation on a result you ve just found, and that result is the first number in the expression

### Introduction to the TI-Nspire CX

Introduction to the TI-Nspire CX Activity Overview: In this activity, you will become familiar with the layout of the TI-Nspire CX. Step 1: Locate the Touchpad. The Touchpad is used to navigate the cursor

### Data Analysis Tools. Tools for Summarizing Data

Data Analysis Tools This section of the notes is meant to introduce you to many of the tools that are provided by Excel under the Tools/Data Analysis menu item. If your computer does not have that tool

### Simple Programming in MATLAB. Plotting a graph using MATLAB involves three steps:

Simple Programming in MATLAB Plotting Graphs: We will plot the graph of the function y = f(x) = e 1.5x sin(8πx), 0 x 1 Plotting a graph using MATLAB involves three steps: Create points 0 = x 1 < x 2

### Solving Systems of Linear Equations

LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how

### 2.1: MATRIX OPERATIONS

.: MATRIX OPERATIONS What are diagonal entries and the main diagonal of a matrix? What is a diagonal matrix? When are matrices equal? Scalar Multiplication 45 Matrix Addition Theorem (pg 0) Let A, B, and

### Linear Algebra Review. Vectors

Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka kosecka@cs.gmu.edu http://cs.gmu.edu/~kosecka/cs682.html Virginia de Sa Cogsci 8F Linear Algebra review UCSD Vectors The length

### Introduction. Chapter 1

Chapter 1 Introduction MATLAB (Matrix laboratory) is an interactive software system for numerical computations and graphics. As the name suggests, MATLAB is especially designed for matrix computations:

### a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

### A Quick Tutorial on MATLAB. Gowtham Bellala

A Quick Tutorial on MATLAB Gowtham Bellala MATLAB MATLAB is a software package for doing numerical computation. It was originally designed for solving linear algebra type problems using matrices. It s

### Microsoft Excel 2013 Pivot Tables (Level 3)

IT Training Microsoft Excel 2013 Pivot Tables (Level 3) Contents Introduction... 1 Creating a Pivot Table... 1 A One-Dimensional Table... 2 A Two-Dimensional Table... 4 A Three-Dimensional Table... 5 Hiding

Chapter 4. Spreadsheets We ve discussed rather briefly the use of computer algebra in 3.5. The approach of relying on www.wolframalpha.com is a poor subsititute for a fullfeatured computer algebra program

### MATH 551 - APPLIED MATRIX THEORY

MATH 55 - APPLIED MATRIX THEORY FINAL TEST: SAMPLE with SOLUTIONS (25 points NAME: PROBLEM (3 points A web of 5 pages is described by a directed graph whose matrix is given by A Do the following ( points

### Kerby Shedden October, 2007. Overview of R

Kerby Shedden October, 2007 Overview of R R R is a programming language for statistical computing, data analysis, and graphics. It is a re-implementation of the S language, which was developed in the 1980

### EXCEL SOLVER TUTORIAL

ENGR62/MS&E111 Autumn 2003 2004 Prof. Ben Van Roy October 1, 2003 EXCEL SOLVER TUTORIAL This tutorial will introduce you to some essential features of Excel and its plug-in, Solver, that we will be using

### Using R to Find Correlations

Page 1 of 11 Using R to Find Correlations Michael A. Covington Institute for Artificial Intelligence The University of Georgia 2011 December 9 Introduction In what follows I will demonstrate statistical

### How to Type Math Symbols in MS Word

Word has some great tools for helping you input math symbols and math equations into your assignment or Word document! On the next few pages, you will see screens and instructions for how to input various

Welcome to Exchange Mail Customer Full Name Your e-mail is now being delivered and stored on the new Exchange server. Your new e-mail address is @rit.edu. This is the e-mail address that you should give

### Visual basic tutorial problems, developed by Dr. Clement,

EXCEL Visual Basic Tutorial Problems (Version January, 2011) Dr. Prabhakar Clement Arthur H. Feagin Distinguished Chair Professor Department of Civil Engineering, Auburn University Home page: http://www.eng.auburn.edu/users/clemept/