The roots are found with the following two statements. We have denoted the polynomial as p1, and the roots as roots_ p1.

Size: px
Start display at page:

Download "The roots are found with the following two statements. We have denoted the polynomial as p1, and the roots as roots_ p1."

Transcription

1 Part II Lesson 10 Numerical Analysis Finding roots of a polynomial In MATLAB, a polynomial is expressed as a row vector of the form [an an 1 a2 a1 a0]. The elements ai of this vector are the coefficients of the polynomial in descending order. We must include terms whose coefficients are zero. We can find the roots of any polynomial with the roots (p) function where p is a row vector containing the polynomial coefficients in descending order. Exercise 1.!! Find the roots of the polynomial There is no cube term; therefore, we must enter zero as its coefficient. The roots are found with the statements below where we have defined the polynomial as p2, and the roots of this polynomial as roots_ p2. The result indicates that this polynomial has three real roots, and two complex roots. p2=[ ] p2 =! 1! -7! 0! 16! 25! 52 roots_ p2=roots(p2) roots_p2 =!! !! ! ! i! i Exercise 2.!! Find the roots of the polynomial p1(x) = x 4 10 x x 2 50x +24 The roots are found with the following two statements. We have denoted the polynomial as p1, and the roots as roots_ p1. p1=[ ] % Specify the coefficients of p1(x) p1 =! roots_ p1=roots(p1) % Find the roots of p1(x) roots_p1 =! ! ! ! From the above results we observe that MATLAB displays the polynomial coefficients as a row vector, and the roots as a column vector.

2 Exercise 3. Solving Quadratic Equations You can solve equations involving variables with solve or fzero. To find the solutions of the quadratic equation, type the following in command prompt >> solve( xˆ2-2*x - 4 = 0 ) ans =! [ 5^(1/2)+1]! [ 1-5^(1/2)] Note that the equation to be solved is specified as a string; that is, it is surrounded by single quotes. The answer consists of the exact (symbolic) solutions

3 LESSON 11 Matrices Exercise 1. Compute A+B and A B given that Solution: and Check with MATLAB in command prompt: Exercise 2. Transpose of a matrix The transpose of a matrix A, denoted as A T, is the matrix that is obtained when the rows and columns of matrix A are interchanged. For example, if In MATLAB we use the apostrophe ( ) symbol to denote and obtain the transpose of a matrix. Thus, for the above example,

4 A' % Display the transpose of A Exercise 3. (a) Determinants

5 Exercise 3. (b) Compute the determinant of A using the elements of the first row. Exercise 4. Cramer s Rule

6 We will verify with MATLAB as follows

7 Exercise 5. Solution of Simultaneous Equations with Matrices Consider the relation, AX = B where A and B are matrices whose elements are known, and X is a matrix (a column vector) AX = B whose elements are the unknowns. We assume that A and X are conformable for multiplication. Multiplication of both sides of AX = B by A 1 yields: Therefore, we can use the above equation to solve any set of simultaneous equations that have solutions. We will refer to this method as the inverse matrix method of solution of simultaneous equations. Given the system of equations Compute the unknown s x1, x2, and x3 using the inverse matrix method. Solution: In matrix form, the given set of equations is AX = B where

8 and by X = A -1 B we obtain

9 Exercise 6. Finding Eigen values and Eigen vectors 1. Find eigen vales and eigen vectors of the following 3 x 3 matrix using command window >> A=[5-3 2; ; 4 2-9]; >> eig(a) ans = >> [eigvec,eigval]=eig(a) eigvec = eigval = Find the eigen value and eigen vector for the following 2 X 2 matrix using command window >> A=[ ; ]; >> [eigvec,eigval]=eig(a) eigvec = eigval =

10 Lesson 12 Ordinary Differential Equations Exercise 1. Solving a first order ordinary differential equation Solve the first order linear differential equation with the initial conditions x(0) = 0. Step 1: Write the equation(s) as a system of first-order equations: Step 2: Write a function to compute the new derivatives and save it as an M-File named simpode.m function xdot = simpode(t,x); %SIMPODE: Computes xdot = x + t %Call syntax: xdot = simpode(t,x); xdot = x + t;! Step 3: Use ode23 to compute solution in the command window >>tspan = [0 2];!! %Specify time span! >>x0 = 0;!!! %Specify x0! >>[t,x] = ode23( simpode,tspan,x0); % Now executes ode23! >>plot(t,x)!! %plot t vs. x! >>xlabel( t )!! %label x-axis! >>ylabel ( x )!! %label y-axis the plot generated by the above commands are shown below

11 Excercise 2. Solve the simple ODE with the initial condition x(0)=1 Step 1: Write the equation(s) as a system of first-order equations: Step 2: Write a function to compute the new derivatives and save it as an M-File named simpode1.m function xdot = simpode(t,x); %SIMPODE: Computes xdot = x + t %Call syntax: xdot = simpode(t,x); xdot = -10*x;! Step 3: Use ode23 to compute solution in the command window >>tspan = [0 1];! %Specify time span! >>x0 = 1;!!! %Specify x0! >>[t,x] = ode23( simpode1,tspan,x0); % Now executes ode23! >>plot(t,x)!! %plot t vs. x! >>xlabel( t )!! %label x-axis! >>ylabel ( x )!! %label y-axis the plot generated by the above commands are shown below

MATLAB BASICS. Instructor: Prof. Shahrouk Ahmadi. TA: Kartik Bulusu

MATLAB BASICS. Instructor: Prof. Shahrouk Ahmadi. TA: Kartik Bulusu MATLAB BASICS Instructor: Prof. Shahrouk Ahmadi 1. What are M-files TA: Kartik Bulusu M-files are files that contain a collection of MATLAB commands or are used to define new MATLAB functions. For the

More information

Matlab Section. November 8, 2005

Matlab Section. November 8, 2005 Matlab Section November 8, 2005 1 1 General commands Clear all variables from memory : clear all Close all figure windows : close all Save a variable in.mat format : save filename name of variable Load

More information

Manifesto on Numerical Integration of Equations of Motion Using Matlab

Manifesto on Numerical Integration of Equations of Motion Using Matlab Manifesto on Numerical Integration of Equations of Motion Using Matlab C. Hall April 11, 2002 This handout is intended to help you understand numerical integration and to put it into practice using Matlab

More information

AMS 27L LAB #8 Winter 2009

AMS 27L LAB #8 Winter 2009 AMS 27L LAB #8 Winter 29 Solving ODE s in Matlab Objectives:. To use Matlab s ODE Solvers 2. To practice using functions and in-line functions Matlab s ODE Suite Matlab offers a suite of ODE solvers including:

More information

2 Solving Ordinary Differential Equations Using MATLAB

2 Solving Ordinary Differential Equations Using MATLAB Penn State Erie, The Behrend College School of Engineering E E 383 Signals and Control Lab Spring 2008 Lab 3 System Responses January 31, 2008 Due: February 7, 2008 Number of Lab Periods: 1 1 Objective

More information

System Simulation using Matlab

System Simulation using Matlab EE4314 Fall 2008 System Simulation using Matlab The purpose of this laboratory work is to provide experience with the Matlab software for system simulation. The laboratory work contains a guide for solving

More information

1 Overview of Simulink. 2 State-space equations

1 Overview of Simulink. 2 State-space equations Modelling and simulation of engineering systems Simulink Exercise 1 - translational mechanical systems Dr. M. Turner (mct6@sun.engg.le.ac.uk 1 Overview of Simulink Simulink is a package which runs in the

More information

Vector Fields and Solutions to Ordinary Differential Equations using MATLAB/Octave

Vector Fields and Solutions to Ordinary Differential Equations using MATLAB/Octave Vector Fields and Solutions to Ordinary Differential Equations using MATLAB/Octave Andreas Stahel 5th December 27 Contents Vector field for the logistic equation 2 Solutions of ordinary differential equations

More information

Example 1 (Characteristic Equation, Eigenvalue, and Eigenvector)

Example 1 (Characteristic Equation, Eigenvalue, and Eigenvector) Matlab Lab 3 Example 1 (Characteristic Equation, Eigenvalue, and Eigenvector) A polynomial equation is uniquely determined by the coefficients of the monomial terms. For example, the quadratic equation

More information

Matlab Exercise 0 Due 1/25/06

Matlab Exercise 0 Due 1/25/06 Matlab Exercise 0 Due 1/25/06 Geop 523 Theoretical Seismology January 18, 2006 Much of our work in this class will be done using Matlab. The goal of this exercise is to get you familiar with using Matlab

More information

2D Plotting with Matlab

2D Plotting with Matlab GEEN 1300 Introduction to Engineering Computing Class Meeting #22 Monday, Nov. 9 th Engineering Computing and Problem Solving with Matlab 2-D plotting with Matlab Script files User-defined functions Matlab

More information

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Part I: Basics MATLAB Environment Getting Help Variables Vectors, Matrices, and

More information

Computational Foundations of Cognitive Science

Computational Foundations of Cognitive Science Computational Foundations of Cognitive Science Lecture 14: Inverses and Eigenvectors in Matlab; Plotting and Graphics Frank Keller School of Informatics University of Edinburgh keller@inf.ed.ac.uk February

More information

TUTORIAL: STATE VARIABLES and MATLAB

TUTORIAL: STATE VARIABLES and MATLAB TUTORIAL TUTORIAL: STATE VARIABLES and MATLAB Time-domain analysis of circuits with more than one L and C is difficult because it requires solution of characteristic equations higher than second degree.

More information

Math 502 Fall 2005 Solutions to Homework 3

Math 502 Fall 2005 Solutions to Homework 3 Math 502 Fall 2005 Solutions to Homework 3 (1) As shown in class, the relative distance between adjacent binary floating points numbers is 2 1 t, where t is the number of digits in the mantissa. Since

More information

Math Assignment 3 - Linear Algebra

Math Assignment 3 - Linear Algebra Math 216 - Assignment 3 - Linear Algebra Due: Tuesday, March 27. Nothing accepted after Thursday, March 29. This is worth 15 points. 10% points off for being late. You may work by yourself or in pairs.

More information

Introduction to Matlab

Introduction to Matlab History of Matlab Starting Matlab Matrix operation Introduction to Matlab Useful commands in linear algebra Scripts-M file Use Matlab to explore the notion of span and the geometry of eigenvalues and eigenvectors.

More information

Experiment 2: Introduction to MATLAB II

Experiment 2: Introduction to MATLAB II Experiment : Introduction to MATLAB II.Vector, Matrix and Array Commands Some of MATLAB functions operate essentially on a vector (row or column), and others on an m-by-n matrix (m >= ). Array find length

More information

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition Prof. Tesler Math 283 Fall 2018 Also see the separate version of this with Matlab and R commands. Prof. Tesler Diagonalizing

More information

Lesson 11: Mass-Spring, Resonance and ode45

Lesson 11: Mass-Spring, Resonance and ode45 Lesson 11: Mass-Spring, Resonance and ode45 11.1 Applied Problem. Trucks and cars have springs and shock absorbers to make a comfortable and safe ride. Without good shock absorbers, the truck or car will

More information

Statistical methods. Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra

Statistical methods. Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra Statistical methods Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra Statistical methods Generating random numbers MATLAB has many built-in functions

More information

Note: The command name is upper case in the description given by help, but must be lower case in actual use. And the backslash Anb is dierent when A i

Note: The command name is upper case in the description given by help, but must be lower case in actual use. And the backslash Anb is dierent when A i MATLAB Tutorial You need a small number 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 to

More information

MATLAB and Mathematical Introduction Will be discussed in class on 1/24/11

MATLAB and Mathematical Introduction Will be discussed in class on 1/24/11 MATLAB and Mathematical Introduction Will be discussed in class on 1/24/11 GEOP 523; Theoretical Seismology January 17, 2011 Much of our work in this class will be done using MATLAB. The goal of this exercise

More information

LAB 1: MATLAB - Introduction to Programming. Objective:

LAB 1: MATLAB - Introduction to Programming. Objective: LAB 1: MATLAB - Introduction to Programming Objective: The objective of this laboratory is to review how to use MATLAB as a programming tool and to review a classic analytical solution to a steady-state

More information

(a) Compute the projections of vectors [1,0,0] and [0,1,0] onto the line spanned by a Solution: The projection matrix is P = 1

(a) Compute the projections of vectors [1,0,0] and [0,1,0] onto the line spanned by a Solution: The projection matrix is P = 1 6 [3] 3. Consider the plane S defined by 2u 3v+w = 0, and recall that the normal to this plane is the vector a = [2, 3,1]. (a) Compute the projections of vectors [1,0,0] and [0,1,0] onto the line spanned

More information

Spis treści Contents List of Examples Preface to Third Edition 21

Spis treści Contents List of Examples Preface to Third Edition 21 An engineer's guide to MATLAB : with applications from mechanical, aerospace, electrical, civil, and biological systems engineering / Edward B. Magrab [et al.]. - 3rd ed. - Boston, cop. 2011 Spis treści

More information

USE OF MATLAB TO UNDERSTAND BASIC MATHEMATICS

USE OF MATLAB TO UNDERSTAND BASIC MATHEMATICS USE OF MATLAB TO UNDERSTAND BASIC MATHEMATICS Sanjay Gupta P. G. Department of Mathematics, Dev Samaj College For Women, Punjab ( India ) ABSTRACT In this paper, we talk about the ways in which computer

More information

Lesson 5: The Graph of the Equation y = f(x)

Lesson 5: The Graph of the Equation y = f(x) Lesson 5: The Graph of the Equation y = f(x) Learning targets: I can identify when a function is increasing, decreasing, positive and negative and use interval notation to describe intervals where the

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for solving higher order ODEs and

More information

0.1 Eigenvalues and Eigenvectors

0.1 Eigenvalues and Eigenvectors 0.. EIGENVALUES AND EIGENVECTORS MATH 22AL Computer LAB for Linear Algebra Eigenvalues and Eigenvectors Dr. Daddel Please save your MATLAB Session (diary)as LAB9.text and submit. 0. Eigenvalues and Eigenvectors

More information

Laboratory handout 1 Mathematical preliminaries

Laboratory handout 1 Mathematical preliminaries laboratory handouts, me 340 2 Laboratory handout 1 Mathematical preliminaries In this handout, an expression on the left of the symbol := is defined in terms of the expression on the right. In contrast,

More information

Laboratory 1. Solving differential equations with nonzero initial conditions

Laboratory 1. Solving differential equations with nonzero initial conditions Laboratory 1 Solving differential equations with nonzero initial conditions 1. Purpose of the exercise: - learning symbolic and numerical methods of differential equations solving with MATLAB - using Simulink

More information

Linear Algebra Using MATLAB

Linear Algebra Using MATLAB Linear Algebra Using MATLAB MATH 5331 1 May 12, 2010 1 Selected material from the text Linear Algebra and Differential Equations Using MATLAB by Martin Golubitsky and Michael Dellnitz Contents 1 Preliminaries

More information

Polynomial Form. Factored Form. Perfect Squares

Polynomial Form. Factored Form. Perfect Squares We ve seen how to solve quadratic equations (ax 2 + bx + c = 0) by factoring and by extracting square roots, but what if neither of those methods are an option? What do we do with a quadratic equation

More information

SIGNALS AND LINEAR SYSTEMS LABORATORY EELE Experiment (2) Introduction to MATLAB - Part (2) Prepared by:

SIGNALS AND LINEAR SYSTEMS LABORATORY EELE Experiment (2) Introduction to MATLAB - Part (2) Prepared by: The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department SIGNALS AND LINEAR SYSTEMS LABORATORY EELE 110 Experiment () Introduction to MATLAB - Part () Prepared by: Eng. Mohammed

More information

Find the solution set of 2x 3y = 5. Answer: We solve for x = (5 + 3y)/2. Hence the solution space consists of all vectors of the form

Find the solution set of 2x 3y = 5. Answer: We solve for x = (5 + 3y)/2. Hence the solution space consists of all vectors of the form Math 2 Homework #7 March 4, 2 7.3.3. Find the solution set of 2x 3y = 5. Answer: We solve for x = (5 + 3y/2. Hence the solution space consists of all vectors of the form ( ( ( ( x (5 + 3y/2 5/2 3/2 x =

More information

Phys 201. Matrices and Determinants

Phys 201. Matrices and Determinants Phys 201 Matrices and Determinants 1 1.1 Matrices 1.2 Operations of matrices 1.3 Types of matrices 1.4 Properties of matrices 1.5 Determinants 1.6 Inverse of a 3 3 matrix 2 1.1 Matrices A 2 3 7 =! " 1

More information

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB (Mathematical Operations with Arrays) Contents Getting Started Matrices Creating Arrays Linear equations Mathematical Operations with Arrays Using Script

More information

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages: CS100: DISCRETE STRUCTURES Lecture 3 Matrices Ch 3 Pages: 246-262 Matrices 2 Introduction DEFINITION 1: A matrix is a rectangular array of numbers. A matrix with m rows and n columns is called an m x n

More information

Introduction to Computational Neuroscience

Introduction to Computational Neuroscience CSE2330 Introduction to Computational Neuroscience Basic computational tools and concepts Tutorial 1 Duration: two weeks 1.1 About this tutorial The objective of this tutorial is to introduce you to: the

More information

New Mexico Tech Hyd 510

New Mexico Tech Hyd 510 Vectors vector - has magnitude and direction (e.g. velocity, specific discharge, hydraulic gradient) scalar - has magnitude only (e.g. porosity, specific yield, storage coefficient) unit vector - a unit

More information

Temperature measurement

Temperature measurement Luleå University of Technology Johan Carlson Last revision: July 22, 2009 Measurement Technology and Uncertainty Analysis - E7021E Lab 3 Temperature measurement Introduction In this lab you are given a

More information

EEE161 Applied Electromagnetics Laboratory 1

EEE161 Applied Electromagnetics Laboratory 1 Dr. Milica Marković Applied Electromagnetics Laboratory page 1 EEE161 Applied Electromagnetics Laboratory 1 Instructor: Dr. Milica Marković Office: Riverside Hall 3028 Email: milica@csus.edu Web:http://gaia.ecs.csus.edu/

More information

Chap 3. Linear Algebra

Chap 3. Linear Algebra Chap 3. Linear Algebra Outlines 1. Introduction 2. Basis, Representation, and Orthonormalization 3. Linear Algebraic Equations 4. Similarity Transformation 5. Diagonal Form and Jordan Form 6. Functions

More information

Homework 1 Solutions

Homework 1 Solutions 18-9 Signals and Systems Profs. Byron Yu and Pulkit Grover Fall 18 Homework 1 Solutions Part One 1. (8 points) Consider the DT signal given by the algorithm: x[] = 1 x[1] = x[n] = x[n 1] x[n ] (a) Plot

More information

A First Course on Kinetics and Reaction Engineering Example S5.1

A First Course on Kinetics and Reaction Engineering Example S5.1 Example S5.1 Problem Purpose This example illustrates the use of the MATLAB template file SolvBVDif.m to solve a second order boundary value ordinary differential equation. Problem Statement Solve the

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MATLAB sessions: Laboratory 4 MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for

More information

Quadratic Formula: - another method for solving quadratic equations (ax 2 + bx + c = 0)

Quadratic Formula: - another method for solving quadratic equations (ax 2 + bx + c = 0) In the previous lesson we showed how to solve quadratic equations that were not factorable and were not perfect squares by making perfect square trinomials using a process called completing the square.

More information

Companion. Jeffrey E. Jones

Companion. Jeffrey E. Jones MATLAB7 Companion 1O11OO1O1O1OOOO1O1OO1111O1O1OO 1O1O1OO1OO1O11OOO1O111O1O1O1O1 O11O1O1O11O1O1O1O1OO1O11O1O1O1 O1O1O1111O11O1O1OO1O1O1O1OOOOO O1111O1O1O1O1O1O1OO1OO1OO1OOO1 O1O11111O1O1O1O1O Jeffrey E.

More information

Equations in Quadratic Form

Equations in Quadratic Form Equations in Quadratic Form MATH 101 College Algebra J. Robert Buchanan Department of Mathematics Summer 2012 Objectives In this lesson we will learn to: make substitutions that allow equations to be written

More information

(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB

(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB (Linear equations) Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots

More information

Least square fit of a line/polynomial to input/output data

Least square fit of a line/polynomial to input/output data of a line/polynomial to input/output data Dr. Madhu N. Belur Control & Computing group Department of Electrical Engineering Indian Institute of Technology Bombay Email: belur@ee.iitb.ac.in 30th Nov, 2010

More information

Lab 13: Ordinary Differential Equations

Lab 13: Ordinary Differential Equations EGR 53L - Fall 2009 Lab 13: Ordinary Differential Equations 13.1 Introduction This lab is aimed at introducing techniques for solving initial-value problems involving ordinary differential equations using

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 75 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP. Use MATLAB solvers for solving higher order ODEs and systems

More information

Lecture 4: Matrices. Math 98, Spring Math 98, Spring 2018 Lecture 4: Matrices 1 / 20

Lecture 4: Matrices. Math 98, Spring Math 98, Spring 2018 Lecture 4: Matrices 1 / 20 Lecture 4: Matrices Math 98, Spring 2018 Math 98, Spring 2018 Lecture 4: Matrices 1 / 20 Reminders Instructor: Eric Hallman Login:!cmfmath98 Password: c@1analog Class Website: https://math.berkeley.edu/~ehallman/98-fa18/

More information

CHAPTER 6 STATE SPACE: FREQUENCY RESPONSE, TIME DOMAIN

CHAPTER 6 STATE SPACE: FREQUENCY RESPONSE, TIME DOMAIN CHAPTER 6 STATE SPACE: FREQUENCY RESPONSE, TIME DOMAIN 6. Introduction Frequency Response This chapter will begin with the state space form of the equations of motion. We will use Laplace transforms to

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Violeta Ivanova, Ph.D. Educational Technology Consultant MIT Academic Computing violeta@mit.edu http://web.mit.edu/violeta/www/iap2006 Topics MATLAB Interface and Basics Linear Algebra

More information

Applied Linear Algebra in Geoscience Using MATLAB

Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in

More information

A First Course on Kinetics and Reaction Engineering Example S3.1

A First Course on Kinetics and Reaction Engineering Example S3.1 Example S3.1 Problem Purpose This example shows how to use the MATLAB script file, FitLinSR.m, to fit a linear model to experimental data. Problem Statement Assume that in the course of solving a kinetics

More information

Polynomial Form. Factored Form. Perfect Squares

Polynomial Form. Factored Form. Perfect Squares We ve seen how to solve quadratic equations (ax 2 + bx + c = 0) by factoring and by extracting square roots, but what if neither of those methods are an option? What do we do with a quadratic equation

More information

Chapter 1 Linear Equations. 1.1 Systems of Linear Equations

Chapter 1 Linear Equations. 1.1 Systems of Linear Equations Chapter Linear Equations. Systems of Linear Equations A linear equation in the n variables x, x 2,..., x n is one that can be expressed in the form a x + a 2 x 2 + + a n x n = b where a, a 2,..., a n and

More information

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections ) c Dr. Igor Zelenko, Fall 2017 1 10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections 7.2-7.4) 1. When each of the functions F 1, F 2,..., F n in right-hand side

More information

Experiment 1: Linear Regression

Experiment 1: Linear Regression Experiment 1: Linear Regression August 27, 2018 1 Description This first exercise will give you practice with linear regression. These exercises have been extensively tested with Matlab, but they should

More information

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition Prof. Tesler Math 283 Fall 2016 Also see the separate version of this with Matlab and R commands. Prof. Tesler Diagonalizing

More information

Linear Systems of Differential Equations

Linear Systems of Differential Equations Chapter 5 Linear Systems of Differential Equations Project 5. Automatic Solution of Linear Systems Calculations with numerical matrices of order greater than 3 are most frequently carried out with the

More information

INTRODUCTION TO TRANSFER FUNCTIONS

INTRODUCTION TO TRANSFER FUNCTIONS INTRODUCTION TO TRANSFER FUNCTIONS The transfer function is the ratio of the output Laplace Transform to the input Laplace Transform assuming zero initial conditions. Many important characteristics of

More information

Solution Set 3, Fall '12

Solution Set 3, Fall '12 Solution Set 3, 86 Fall '2 Do Problem 5 from 32 [ 3 5 Solution (a) A = Only one elimination step is needed to produce the 2 6 echelon form The pivot is the in row, column, and the entry to eliminate is

More information

to have roots with negative real parts, the necessary and sufficient conditions are that:

to have roots with negative real parts, the necessary and sufficient conditions are that: THE UNIVERSITY OF TEXAS AT SAN ANTONIO EE 543 LINEAR SYSTEMS AND CONTROL H O M E W O R K # 7 Sebastian A. Nugroho November 6, 7 Due date of the homework is: Sunday, November 6th @ :59pm.. The following

More information

Matlab Instruction Primer; Chem 691, Spring 2016

Matlab Instruction Primer; Chem 691, Spring 2016 1 Matlab Instruction Primer; Chem 691, Spring 2016 This version dated February 10, 2017 CONTENTS I. Help: To obtain information about any instruction in Matlab 1 II. Scripting 1 III. Loops, determine an

More information

SOLVING EQUATIONS OF ONE VARIABLE

SOLVING EQUATIONS OF ONE VARIABLE 1 SOLVING EQUATIONS OF ONE VARIABLE ELM1222 Numerical Analysis Some of the contents are adopted from Laurene V. Fausett, Applied Numerical Analysis using MATLAB. Prentice Hall Inc., 1999 2 Today s lecture

More information

MATH 235/W08: Orthogonality; Least-Squares; & Best Approximation SOLUTIONS to Assignment 6

MATH 235/W08: Orthogonality; Least-Squares; & Best Approximation SOLUTIONS to Assignment 6 MATH 235/W08: Orthogonality; Least-Squares; & Best Approximation SOLUTIONS to Assignment 6 Solutions to questions 1,2,6,8. Contents 1 Least Squares and the Normal Equations*** 2 1.1 Solution...........................................

More information

Instructions Please answer the five problems on your own paper. These are essay questions: you should write in complete sentences.

Instructions Please answer the five problems on your own paper. These are essay questions: you should write in complete sentences. Instructions Please answer the five problems on your own paper. These are essay questions: you should write in complete sentences.. Recall that P 3 denotes the vector space of polynomials of degree less

More information

Study Notes on Matrices & Determinants for GATE 2017

Study Notes on Matrices & Determinants for GATE 2017 Study Notes on Matrices & Determinants for GATE 2017 Matrices and Determinates are undoubtedly one of the most scoring and high yielding topics in GATE. At least 3-4 questions are always anticipated from

More information

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations Lecture 8: Calculus and Differential Equations Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE201: Computer Applications. See Textbook Chapter 9. Numerical Methods MATLAB provides

More information

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations Lecture 8: Calculus and Differential Equations Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE21: Computer Applications. See Textbook Chapter 9. Numerical Methods MATLAB provides

More information

+ MATRIX VARIABLES AND TWO DIMENSIONAL ARRAYS

+ MATRIX VARIABLES AND TWO DIMENSIONAL ARRAYS + MATRIX VARIABLES AND TWO DIMENSIONAL ARRAYS Matrices are organized rows and columns of numbers that mathematical operations can be performed on. MATLAB is organized around the rules of matrix operations.

More information

Solving Quadratic and Other Polynomial Equations

Solving Quadratic and Other Polynomial Equations Section 4.3 Solving Quadratic and Other Polynomial Equations TERMINOLOGY 4.3 Previously Used: This is a review of terms with which you should already be familiar. Formula New Terms to Learn: Discriminant

More information

ECE 203 LAB 1 MATLAB CONTROLS AND SIMULINK

ECE 203 LAB 1 MATLAB CONTROLS AND SIMULINK Version 1.1 1 of BEFORE YOU BEGIN PREREQUISITE LABS ECE 01 and 0 Labs EXPECTED KNOWLEDGE ECE 03 LAB 1 MATLAB CONTROLS AND SIMULINK Linear systems Transfer functions Step and impulse responses (at the level

More information

Lesson 15: Oregonator, Chemical Reactions and ode15s

Lesson 15: Oregonator, Chemical Reactions and ode15s Lesson 15: Oregonator, Chemical Reactions and ode15s 15.1 Applied Problem. The chemical reaction with bromous acid, bromide ion and cerium ion exhibits a remarkable chemical attributes, which oscillate

More information

CHAPTER 12 TIME DOMAIN: MODAL STATE SPACE FORM

CHAPTER 12 TIME DOMAIN: MODAL STATE SPACE FORM CHAPTER 1 TIME DOMAIN: MODAL STATE SPACE FORM 1.1 Introduction In Chapter 7 we derived the equations of motion in modal form for the system in Figure 1.1. In this chapter we will convert the modal form

More information

CISE 302 Linear Control Systems Laboratory Manual

CISE 302 Linear Control Systems Laboratory Manual King Fahd University of Petroleum & Minerals CISE 302 Linear Control Systems Laboratory Manual Systems Engineering Department Revised - September 2012 2 Lab Experiment 1: Using MATLAB for Control Systems

More information

(Practice)Exam in Linear Algebra

(Practice)Exam in Linear Algebra (Practice)Exam in Linear Algebra May 016 First Year at The Faculties of Engineering and Science and of Health This test has 10 pages and 16 multiple-choice problems. In two-sided print. It is allowed to

More information

Representing Polynomials

Representing Polynomials Lab 4 Representing Polynomials A polynomial of nth degree looks like: a n s n +a n 1 a n 1 +...+a 2 s 2 +a 1 s+a 0 The coefficients a n, a n-1,, a 2, a 1, a 0 are the coefficients of decreasing powers

More information

TWO METHODS FOR OF EQUATIONS

TWO METHODS FOR OF EQUATIONS TWO METHODS FOR FINDING ROOTS OF EQUATIONS Closed (Bracketing) Methods Open Methods Motivation: i In engineering applications, it is often necessary to determine the rootofan of equation when a formula

More information

Lab 2: Static Response, Cantilevered Beam

Lab 2: Static Response, Cantilevered Beam Contents 1 Lab 2: Static Response, Cantilevered Beam 3 1.1 Objectives.......................................... 3 1.2 Scalars, Vectors and Matrices (Allen Downey)...................... 3 1.2.1 Attribution.....................................

More information

Tutorial: 11 SCILAB Programming Applications of Chemical Engineering Problems Date : 26/09/2016

Tutorial: 11 SCILAB Programming Applications of Chemical Engineering Problems Date : 26/09/2016 Tutorial: 11 SCILAB Programming Applications of Chemical Engineering Problems Date : 26/09/2016 Aim To solve the chemical engineering problems (steady state and unsteady state) using SCILAB Problem statements

More information

MATLAB Project 2: MATH240, Spring 2013

MATLAB Project 2: MATH240, Spring 2013 1. Method MATLAB Project 2: MATH240, Spring 2013 This page is more information which can be helpful for your MATLAB work, including some new commands. You re responsible for knowing what s been done before.

More information

9.6: Matrix Exponential, Repeated Eigenvalues. Ex.: A = x 1 (t) = e t 2 F.M.: If we set

9.6: Matrix Exponential, Repeated Eigenvalues. Ex.: A = x 1 (t) = e t 2 F.M.: If we set 9.6: Matrix Exponential, Repeated Eigenvalues x Ax, A : n n (1) Def.: If x 1 (t),...,x n (t) is a fundamental set of solutions (F.S.S.) of (1), then X(t) x 1 (t),...,x n (t) (n n) is called a fundamental

More information

AMS10 HW7 Solutions. All credit is given for effort. (-5 pts for any missing sections) Problem 1 (20 pts) Consider the following matrix 2 A =

AMS10 HW7 Solutions. All credit is given for effort. (-5 pts for any missing sections) Problem 1 (20 pts) Consider the following matrix 2 A = AMS1 HW Solutions All credit is given for effort. (- pts for any missing sections) Problem 1 ( pts) Consider the following matrix 1 1 9 a. Calculate the eigenvalues of A. Eigenvalues are 1 1.1, 9.81,.1

More information

Introduction to Determinants

Introduction to Determinants Introduction to Determinants For any square matrix of order 2, we have found a necessary and sufficient condition for invertibility. Indeed, consider the matrix The matrix A is invertible if and only if.

More information

Some MATLAB Programs and Functions. Bisection Method

Some MATLAB Programs and Functions. Bisection Method Some MATLAB Programs and Functions By Dr. Huda Alsaud Bisection Method %Computes approximate solution of f(x)=0 %Input: function handle f; a,b such that f(a)*f(b)

More information

Lecture 3: Special Matrices

Lecture 3: Special Matrices Lecture 3: Special Matrices Feedback of assignment1 Random matrices The magic matrix commend magic() doesn t give us random matrix. Random matrix means we will get different matrices each time when we

More information

MATLAB for Engineers

MATLAB for Engineers MATLAB for Engineers Adrian Biran Moshe Breiner ADDISON-WESLEY PUBLISHING COMPANY Wokingham, England Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario Amsterdam Bonn Sydney Singapore

More information

BCMB/CHEM 8190 Lab Exercise Using Maple for NMR Data Processing and Pulse Sequence Design March 2012

BCMB/CHEM 8190 Lab Exercise Using Maple for NMR Data Processing and Pulse Sequence Design March 2012 BCMB/CHEM 8190 Lab Exercise Using Maple for NMR Data Processing and Pulse Sequence Design March 2012 Introduction Maple is a powerful collection of routines to aid in the solution of mathematical problems

More information

3. Array and Matrix Operations

3. Array and Matrix Operations 3. Array and Matrix Operations Almost anything you learned about in your linear algebra classmatlab has a command to do. Here is a brief summary of the most useful ones for physics. In MATLAB matrices

More information

M. Matrices and Linear Algebra

M. Matrices and Linear Algebra M. Matrices and Linear Algebra. Matrix algebra. In section D we calculated the determinants of square arrays of numbers. Such arrays are important in mathematics and its applications; they are called matrices.

More information

A repeated root is a root that occurs more than once in a polynomial function.

A repeated root is a root that occurs more than once in a polynomial function. Unit 2A, Lesson 3.3 Finding Zeros Synthetic division, along with your knowledge of end behavior and turning points, can be used to identify the x-intercepts of a polynomial function. This information allows

More information

Algebra 2 Matrices. Multiple Choice Identify the choice that best completes the statement or answers the question. 1. Find.

Algebra 2 Matrices. Multiple Choice Identify the choice that best completes the statement or answers the question. 1. Find. Algebra 2 Matrices Review Multiple Choice Identify the choice that best completes the statement or answers the question. 1. Find. Evaluate the determinant of the matrix. 2. 3. A matrix contains 48 elements.

More information

ECE 3793 Matlab Project 3

ECE 3793 Matlab Project 3 ECE 3793 Matlab Project 3 Spring 2017 Dr. Havlicek DUE: 04/25/2017, 11:59 PM What to Turn In: Make one file that contains your solution for this assignment. It can be an MS WORD file or a PDF file. Make

More information

Math 414 Lecture 1. Reading assignment: Text: Pages 1-29 and Scilab Users Guide: Sections 1-3.

Math 414 Lecture 1. Reading assignment: Text: Pages 1-29 and Scilab Users Guide: Sections 1-3. Math 414 Lecture 1 Homework assignments are always due at the beginning of the next lecture. Operations Research studies linear programming and associated algorithms. Businesses use it to find resource

More information