Scilab Primer. Niket S. Kaisare, Department of Chemical Engineering, IIT-Madras
|
|
- Hannah Harper
- 6 years ago
- Views:
Transcription
1 Scilab Primer Niket S. Kaisare, Department of Chemical Engineering, IIT-Madras INTRODUCTION Scilab is an interactive programming environment geared towards numerical computation and analysis. In some respects, it is similar to the popular program Matlab. Scilab is available free of cost and can be downloaded from The website also has tutorials to get a user started with using Scilab. This primer is designed assuming that a student has no prior experience with Scilab. The best way to use this primer is to use Scilab interactively while reading this document. Starting Scilab Scilab can be started by clicking the Scilab link in the Windows Start Menu at: Start > All Programs > Scilab > Scilab The specific version of Scilab installed on your machine may be different. The Scilab command prompt appears as: --> This indicates that Scilab is now ready to accept commands. Getting Help The Scilab help browser can be launched by pressing the F1 key, or by clicking on the help menu or by typing help on the command prompt. VARIABLES AND MATRICES Defining variables A variable can be defined as a scalar as follows: -->a = 1 a = 1. --> The variable a now has the value of 1. Scilab displays the contents of the variable on the next lines. A semicolon at the end of the line suppresses display. A matrix can be entered in a similar manner. The elements of a row are separated by a comma or a space, whereas various rows are separated by a semi-colon or a carriage return (the enter key). Examples: -->b = [ ] b = >c = [1; 2; 3; 4; 5] c =
2 Similarly, a 2*3 matrix (two rows, three columns) can be defined as follows: -->d = [1, 2, 3; 4, 5, 6] d = Any element of the matrix or vector can be accessed by addressing its location. -->d(2,1) 4. -->b(2) 2. -->b(2,1)!--error 21 invalid index -->b(1,2) 2. In the first command above, we accessed the element of matrix d on row 2 and column 1. Since b is a row vector, the second element can be accessed either as b(2) or b(1,2). However, b(2,1) returns an error because vector b does not have row 2. Matrix Transpose ' is the transpose command. Examples: -->b' >d'
3 Scilab Constants The names of Scilab-defined constants start with %. The list of useful constants: -->%pi %pi = -->%e %e = -->%t %t = T > *%i i Note that %t and %f are Boolean (true / false), %i is the complex unity, and %s and %z may be used to define laplace and Z-transforms, respectively. Matrix sizes There are two commands used to obtain sizes of the matrices: length and size. The former is meaningful only for vectors (row or column). Examples: -->length(c) 5. -->size(d) >length(d) 6. Note that length command when used with a matrix does not give an error. The size can directly be assigned to two variables [nbr_rows, nbr_columns] using size as: -->[m,n] = size(d) n = 3. m = 2.
4 Matrix Vectors A matrix can be constructed from an existing matrix or a vector. Rows or columns can be added to a matrix. Examples: -->e = [d, [0 0.4; ]] e = In the above example, d is a 2*3 matrix. The command [0 0.4; ] creates a 2*2 matrix. This matrix is appended to the existing matrix, resulting in a 2*5 matrix. Likewise, we can also use the following operation to append a vector to an existing matrix (or an existing vector): -->f = [e;b] f = >g = [e;c]!--error 6 inconsistent row/column dimensions The second command above did not work because matrix e is a 3*5 matix, while c is a 5*1 vector. In order to append an additional row, the number of columns have to be the same (f has 5 columns and c has 1 column; however, e and b both had 5 columns). An entire row/column of a matrix can be accessed as follows -->f(:,1) >f(3,2:5) In the first example, the first column of f is returned. One can also return a range of rows/columns as in the second example, where the second to fifth elements of row 3 are returned. MATRIX OPERATIONS Addition, Subtraction and Scalar Multiplication The usual rules of matrix addition and subtraction are applicable: the two matrices should have the same size. Exception: if a scalar is added (or subtracted) to a matrix, it gets added to each element of the matrix. Scalar multiplication also follows the normal rules. Examples: -->p = [4 5 7; ]; // 2*3 matrix
5 -->q = 2; -->r = [2 1 5; 2-3 7]; -->s = r'; // Scalar // 2*3 matrix // 3*2 matrix -->p + q >p - r >p - s!--error 9 inconsistent subtraction -->p * q Matrix Multiplication In order to multiply two matrices, they need to be commutative. Some examples: -->p*r!--error 10 inconsistent multiplication -->p*s -->s*p Scilab also provides element-by-element multiplication or division of two matrices using the operators.* and./. The two matrices need to be of the same sizes in order to carry out this operation. Examples:
6 -->p.* r >p./ p Power (Square) and Exponential of a Matrix Like the previous case, two different variant exist: taking power of a matrix and taking power of individual elements of a matrix. For example, in case of square of matrix A, we compute A*A, whereas squaring elements of a matrix is nothing but A(i,j)*A(i,j). Matrix exponent and powers are defined only for square matrices. Like previous example, we use ^ for matrix power and.^ for taking power of matrix elements. -->p ^ 2!--error 20 first argument must be square matrix -->A = [1 4; 0 2] A = >A.^ >A ^ Matrix exponent can be computed using expm whereas exponent of individual elements is computed using exp. -->expm(a) >exp(a)
7 LINEAR ALGEBRA Matrix Inverse -->inv(a) Eigenvalues, Eigenvectors and Diagonalization The eigenvalues can be obtained using the command spec. -->eigenvals = spec(a) eigenvals = Diagonalization of matrix A in the form -->[Lam, X] = bdiag(a) X = 1 A = XΛX is obtained as follows: Lam = >X * Lam * inv(x) Singular Value Decomposition T Any matrix (square or non-square) can be decomposed in the standard form: A= UΣV using singular value decomposition. The diagonal elements of Σ are the singular values and U and V are unitary matrices (i.e., U = U T and V = V T ). -->[U,S,V] = svd(a) V = S =
8 U = Singular value decomposition is extremely useful in linear systems analysis and control theory. The primer is not completed for the topics listed below. Please refer to the accompanying document (attached below) for additional examples. This document was prepared by Mr. Vishnu Murthy, an MS scholar and Dr. Arun K. Tangirala. SOLVING ALGEBRAIC AND ORDINARY DIFFERENTIAL EQUATIONS LINEAR TIME INVARIANT (LTI) MODELS
9 poly - polynomial definition SCILAB TUTORIAL Date: 2-Jul-07 IIT Madras [p]=poly(a,"x", ["flag"]) a : matrix or real number x : symbolic variable "flag" : string ("roots", "coeff"), default value is "roots". syslin - linear system definition [sl]=syslin(dom,a,b,c [,D [,x0] ]) [sl]=syslin(dom,n,d) [sl]=syslin(dom,h) dom : character string ( 'c', 'd' ), or [] or a scalar. A,B,C,D : matrices of the state-space representation ( D optional with default value zero matrix). For improper systems D is a polynomial matrix. x0 : vector (initial state; default value is 0 ) N, D : polynomial matrices H : rational matrix or linear state space representation sl : tlist (" syslin " list) representing the linear system ss2tf - conversion from state-space to transfer function [h]=ss2tf(sl) tf2ss - transfer to state-space sl=tf2ss(h [,tol]) h : rational matrix tol : may be the constant rtol or the 2 vector [rtol atol] rtol :tolerance used when evaluating observability. atol :absolute tolerance used when evaluating observability. sl : linear system ( syslin list sl=[a,b,c,d(s)] ) simp_mode - toggle rational simplification mod=simp_mode() simp_mode(mod) mod : a boolean rational simplification is called after nearly each operations on rationals. It is possible to toggle simplification on or off using simp_mode function. simp_mod(%t) set rational simplification mode on simp_mod(%f) set rational simplification mode off mod=simp_mod() returns in mod the current rational simplification mode simp - rational simplification [N1,D1]=simp(N,D)
10 H1=simp(H) N,D : real polynomials or real matrix polynomials H : rational matrix (i.e matrix with entries n/d, n and d real polynomials) roots - roots of polynomials [n1,d1]=simp(n,d) calculates two polynomials n1 and d1 such that n1/d1 = n/d. [x]=roots(p) spec - eigenvalues of matrices and pencils det - determinant evals=spec(a) det(x) inv - matrix inverse inv(x) csim - simulation (time response) of linear system [y [,x]]=csim(u,t,sl,[x0 [,tol]]) linspace - linearly spaced vector u : function, list or string (control) t : real vector specifying times with, t(1) is the initial time ( x0=x(t(1)) ). sl : list ( syslin ) y : a matrix such that y=[y(t(i)], i=1,..,n x : a matrix such that x=[x(t(i)], i=1,..,n tol : a 2 vector [atol rtol] defining absolute and relative tolerances for ode solver [v]=linspace(x1,x2 [,n]) x1,x2 : real or complex scalars n : integer (number of values) (default value = 100) v : real or complex row vector grand - Random number generator(s) Y=grand(m, n, dist_type [,p1,...,pk]) Y=grand(X, dist_type [,p1,...,pk]) Y=grand(n, dist_type [,p1,...,pk]) m, n : integers, size of the wanted matrix Y X : a matrix whom only the dimensions (say m x n ) are used dist_type : a string given the distribution which (independants) variates are to be generated ('bin', 'nor', 'poi', etc...) p1,..., pk : the parameters (reals or integers) required to define completly the distribution dist_type Y : the resulting m x n random matrix chisquare : Y=grand(m,n,'chi', Df) generates random variates from the chisquare distribution with Df (real > 0.0) degrees of freedom. Related function(s) :
11 Gauss Laplace (normal) : Y=grand(m,n,'nor',Av,Sd) generates random variates from the normal distribution with mean Av (real) and standard deviation Sd (real >= 0). Related function(s) uniform (unf) : Y=grand(m,n,'unf',Low,High) generates random reals uniformly distributed in [Low, High) power - power operation (^,.^) t=a^b t=a**b t=a.^b sqrt - square root A,t : scalar, polynomial or rational matrix. b :a scalar, a vector or a scalar matrix. y=sqrt(x) x : real or complex scalar or vector sqrt(x) is the vector of the square root of the x elements. Result is complex if x is negative. sqrtm - matrix square root y=sqrtm(x) x : real or complex square matrix y=sqrt(x) is the matrix square root of the x x matrix ( x=y^2 ) Result may not be accurate if x is not symmetric Example:1 Enter a matrix and calculate its 1. Eigen values 2. Determinant 3. Inverse 4. square root 5. square -->a=[ ; ] a =
12 >spec(a) >det(a) >inv(a) >sqrt(a) i i -->sqrtm(a) 2.459D i D i 2.238D i 1.011D i -->a.^ >a^ >s=poly(0,'s'); -->a=[0 s+1; s+2 s] a = s 2 + s s -->det(a) s - s
13 -->inv(a) - s 1 + s s + s 2 + 3s + s 2 + s s + s 2 + 3s + s Example: 2 Create a simple system G(s)=1/(s+1) and plot its Impulse response Step response Ramp response Sine response -->s=%s; // first create a variable -->num=1; -->den=s+1; -->tf=num/den tf = s -->//tf is not yet usable object -->//create a scilab continuous system LTI object -->tf1=syslin('c',tf) tf1 = s -->// create a time axis, -->t=linspace(0,10,500); -->imp_res=csim('imp',t,tf1); -->step_res=csim('step',t,tf1); -->ramp_res=csim(t,t,tf1); -->plot(t,imp_res),xgrid(),xtitle('impulse response','time','response'); -->plot(t,step_res),xgrid(),xtitle('step response','time','response');
14 -->plot(t,ramp_res),xgrid(),xtitle('ramp response','time','response'); -->plot(t,sin(2*%pi*1*t)),xgrid(),xtitle('sine response','time','response'); -->s1=tf2ss(tf1) s1 = s1(1) (state-space system:)!lss A B C D X0 dt! c s1(2) = A matrix = s1(3) = B matrix = s1(4) = C matrix = s1(5) = D matrix = s1(6) = X0 (initial state) = s1(7) = Time domain = -->tf2=ss2tf(s1) // state space to transfer function tf2 = s Example:3 Create a transfer function G(s)=(s+1)/(s^2+3s+2) -->s=%s -->num=s+1; -->den=s^2+3*s+2; -->tf=num/den tf =
15 2 + s -->//this is not the required form -->// so, inorder to avoid this we use simp_mode(%f) -->simp_mode(%f) -->tf1=num/den tf1 = 1 + s s + s -->zeros_tf1=roots(num) zeros_tf1 = >poles_tf1=roots(den) poles_tf1 = Script file in scilab: Example: 1 // normal distribution n=2048; a=grand(n,1,'nor',1,20); s=0; m=0; for i=1:n s=s+a(i,1); end compmean=s/n s=0; for i=1:n s=s+(a(i,1)-m)^2; end copmsd=sqrt(s/(n-1)) actulmean=mean(a) actualsd=stdev(a)
16 histplot(20,a) Example:2 Frequency response // Magnitude plot s=%s; num=1; den=s+1; tf=syslin('c',num/den) x=0:0.1:2*%pi; m=sqrt(1+x^2); mag=m^(-1); subplot(2,1,1),plot2d1("gln",x,mag),xtitle('frequency response','w','ar'),xgrid(), subplot(2,1,2),bode(tf,0.01,100); Functios in scilab: Example:1 function [r1,r2]=qroots(a,b,c) // this function is used to calculate the roots of quadratic equation
17 //equation: ax^2+bx+c=0 // inputs a,b,c are coefficients of equation r1=(-b+sqrt(b^2-4*a*c))/(2*a) r2=(-b-sqrt(b^2-4*a*c))/(2*a) endfunction Scicos: Example: Consider an isothermal reactor where the following reactions take place Assuming a constant volume, the following equations describe the system behavior Simulate using scicos: the dilution rate F/V is the manipulated variable and inlet concentration C Af is disturbance Simulate the system for initial conditions C AO =10gmol/l, C BO =0 gmol/l Initial concentration C Af =10 gmol/l F/V = min -1 where: k1 = 5/6; k2 = 5/3; k3 = 1/6; In scicos Main block sub block
18 Exercise Question: 1 Solve the system of equations: 2x+y=1, x+2y+z=2, y+z=4; and also calculate its Eigen values Determinant Inverse Square root Square Question:2 Consider the following equations x + y=2, x + (1+e)y = 4 obtain A -1, det of A, eig values and solve x & y. for e=0.01, Question: 3 Create G(s) = (s 2-1)/(s 3 +6s 2 +11s+6) and calculate its poles and zeros. Convert in state space representation. Plot its impulse response and step response. Question: 4 Consider an isothermal reactor where the following reactions take place Assuming a constant volume, the following equations describe the system behavior Simulate using scicos: the dilution rate F/V is the manipulated variable and inlet concentration C Af is disturbance Simulate the system for initial conditions C AO =10gmol/l, C BO =0 gmol/l Initial concentration C Af =10 gmol/l F/V = min -1 where: k1 = 5/6; k2 = 5/3; k3 = 1/6;
(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 informationJanuary 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 informationMatlab 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 informationLinear 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 informationLinear 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 information3. 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 informationQuiz ) Locate your 1 st order neighbors. 1) Simplify. Name Hometown. Name Hometown. Name Hometown.
Quiz 1) Simplify 9999 999 9999 998 9999 998 2) Locate your 1 st order neighbors Name Hometown Me Name Hometown Name Hometown Name Hometown Solving Linear Algebraic Equa3ons Basic Concepts Here only real
More informationMatrices A matrix is a rectangular array of numbers. For example, the following rectangular arrays of numbers are matrices: 2 1 2
Matrices A matrix is a rectangular array of numbers For example, the following rectangular arrays of numbers are matrices: 7 A = B = C = 3 6 5 8 0 6 D = [ 3 5 7 9 E = 8 7653 0 Matrices vary in size An
More informationIntroduction 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 informationBackground Mathematics (2/2) 1. David Barber
Background Mathematics (2/2) 1 David Barber University College London Modified by Samson Cheung (sccheung@ieee.org) 1 These slides accompany the book Bayesian Reasoning and Machine Learning. The book and
More informationSIGNALS 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 informationSAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra
1.1. Introduction SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear algebra is a specific branch of mathematics dealing with the study of vectors, vector spaces with functions that
More informationSAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra
SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to 1.1. Introduction Linear algebra is a specific branch of mathematics dealing with the study of vectors, vector spaces with functions that
More informationIdentity Matrix: EDU> eye(3) ans = Matrix of Ones: EDU> ones(2,3) ans =
Very Basic MATLAB Peter J. Olver October, 2003 Matrices: Type your matrix as follows: Use, or space to separate entries, and ; or return after each row. EDU> [;5 0-3 6;; - 5 ] or EDU> [,5,6,-9;5,0,-3,6;7,8,5,0;-,,5,]
More informationUsing MATLAB. Linear Algebra
Using MATLAB in Linear Algebra Edward Neuman Department of Mathematics Southern Illinois University at Carbondale One of the nice features of MATLAB is its ease of computations with vectors and matrices.
More informationIntroduction 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 informationChapter 2 Notes, Linear Algebra 5e Lay
Contents.1 Operations with Matrices..................................1.1 Addition and Subtraction.............................1. Multiplication by a scalar............................ 3.1.3 Multiplication
More informationMATLAB 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 informationComputational Methods CMSC/AMSC/MAPL 460. Eigenvalues and Eigenvectors. Ramani Duraiswami, Dept. of Computer Science
Computational Methods CMSC/AMSC/MAPL 460 Eigenvalues and Eigenvectors Ramani Duraiswami, Dept. of Computer Science Eigen Values of a Matrix Recap: A N N matrix A has an eigenvector x (non-zero) with corresponding
More informationSECTION 2: VECTORS AND MATRICES. ENGR 112 Introduction to Engineering Computing
SECTION 2: VECTORS AND MATRICES ENGR 112 Introduction to Engineering Computing 2 Vectors and Matrices The MAT in MATLAB 3 MATLAB The MATrix (not MAThematics) LABoratory MATLAB assumes all numeric variables
More informationAn Introduction to Scilab for EE 210 Circuits Tony Richardson
An Introduction to Scilab for EE 210 Circuits Tony Richardson Introduction This is a brief introduction to Scilab. It is recommended that you try the examples as you read through this introduction. What
More informationEEL2216 Control Theory CT1: PID Controller Design
EEL6 Control Theory CT: PID Controller Design. Objectives (i) To design proportional-integral-derivative (PID) controller for closed loop control. (ii) To evaluate the performance of different controllers
More informationINTRODUCTION TO CONTROL SYSTEMS IN SCILAB
powered by INTRODUCTION TO CONTROL SYSTEMS IN SCILAB In this Scilab tutorial, we introduce readers to the Control System Toolbox that is available in Scilab/Xcos and known as CACSD. This first tutorial
More informationMATLAB 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 informationLecture 5: Special Functions and Operations
Lecture 5: Special Functions and Operations Feedback of Assignment2 Rotation Transformation To rotate by angle θ counterclockwise, set your transformation matrix A as [ ] cos θ sin θ A =. sin θ cos θ We
More information(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 informationA = 3 1. We conclude that the algebraic multiplicity of the eigenvalues are both one, that is,
65 Diagonalizable Matrices It is useful to introduce few more concepts, that are common in the literature Definition 65 The characteristic polynomial of an n n matrix A is the function p(λ) det(a λi) Example
More informationLinear Algebra and Matrices
Linear Algebra and Matrices 4 Overview In this chapter we studying true matrix operations, not element operations as was done in earlier chapters. Working with MAT- LAB functions should now be fairly routine.
More informationMultiple Degree of Freedom Systems. The Millennium bridge required many degrees of freedom to model and design with.
Multiple Degree of Freedom Systems The Millennium bridge required many degrees of freedom to model and design with. The first step in analyzing multiple degrees of freedom (DOF) is to look at DOF DOF:
More information18.S34 linear algebra problems (2007)
18.S34 linear algebra problems (2007) Useful ideas for evaluating determinants 1. Row reduction, expanding by minors, or combinations thereof; sometimes these are useful in combination with an induction
More informationMath 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 informationMatrices and Linear Algebra
Contents Quantitative methods for Economics and Business University of Ferrara Academic year 2017-2018 Contents 1 Basics 2 3 4 5 Contents 1 Basics 2 3 4 5 Contents 1 Basics 2 3 4 5 Contents 1 Basics 2
More informationExperiment 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 informationL3: Review of linear algebra and MATLAB
L3: Review of linear algebra and MATLAB Vector and matrix notation Vectors Matrices Vector spaces Linear transformations Eigenvalues and eigenvectors MATLAB primer CSCE 666 Pattern Analysis Ricardo Gutierrez-Osuna
More informationThe Singular Value Decomposition
The Singular Value Decomposition Philippe B. Laval KSU Fall 2015 Philippe B. Laval (KSU) SVD Fall 2015 1 / 13 Review of Key Concepts We review some key definitions and results about matrices that will
More informationMath 307 Learning Goals. March 23, 2010
Math 307 Learning Goals March 23, 2010 Course Description The course presents core concepts of linear algebra by focusing on applications in Science and Engineering. Examples of applications from recent
More informationSymmetric and anti symmetric matrices
Symmetric and anti symmetric matrices In linear algebra, a symmetric matrix is a square matrix that is equal to its transpose. Formally, matrix A is symmetric if. A = A Because equal matrices have equal
More informationENGI 9420 Lecture Notes 2 - Matrix Algebra Page Matrix operations can render the solution of a linear system much more efficient.
ENGI 940 Lecture Notes - Matrix Algebra Page.0. Matrix Algebra A linear system of m equations in n unknowns, a x + a x + + a x b (where the a ij and i n n a x + a x + + a x b n n a x + a x + + a x b m
More informationIntroduction to Matrices
POLS 704 Introduction to Matrices Introduction to Matrices. The Cast of Characters A matrix is a rectangular array (i.e., a table) of numbers. For example, 2 3 X 4 5 6 (4 3) 7 8 9 0 0 0 Thismatrix,with4rowsand3columns,isoforder
More informationMatrix notation. A nm : n m : size of the matrix. m : no of columns, n: no of rows. Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1
Matrix notation A nm : n m : size of the matrix m : no of columns, n: no of rows Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1 n = m square matrix Symmetric matrix Upper triangular matrix: matrix
More informationA Glimpse at Scipy FOSSEE. June Abstract This document shows a glimpse of the features of Scipy that will be explored during this course.
A Glimpse at Scipy FOSSEE June 010 Abstract This document shows a glimpse of the features of Scipy that will be explored during this course. 1 Introduction SciPy is open-source software for mathematics,
More informationLinear Algebra & Geometry why is linear algebra useful in computer vision?
Linear Algebra & Geometry why is linear algebra useful in computer vision? References: -Any book on linear algebra! -[HZ] chapters 2, 4 Some of the slides in this lecture are courtesy to Prof. Octavia
More informationMATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.
MATH 311-504 Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product. Determinant is a scalar assigned to each square matrix. Notation. The determinant of a matrix A = (a ij
More informationCS 143 Linear Algebra Review
CS 143 Linear Algebra Review Stefan Roth September 29, 2003 Introductory Remarks This review does not aim at mathematical rigor very much, but instead at ease of understanding and conciseness. Please see
More informationMatrices A brief introduction
Matrices A brief introduction Basilio Bona DAUIN Politecnico di Torino Semester 1, 2014-15 B. Bona (DAUIN) Matrices Semester 1, 2014-15 1 / 41 Definitions Definition A matrix is a set of N real or complex
More informationLinear Algebra Practice Problems
Linear Algebra Practice Problems Math 24 Calculus III Summer 25, Session II. Determine whether the given set is a vector space. If not, give at least one axiom that is not satisfied. Unless otherwise stated,
More information1 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 informationLinear Algebra Review. Vectors
Linear Algebra Review 9/4/7 Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka http://cs.gmu.edu/~kosecka/cs682.html Virginia de Sa (UCSD) Cogsci 8F Linear Algebra review Vectors
More information1 Matrices and vector spaces
Matrices and vector spaces. Which of the following statements about linear vector spaces are true? Where a statement is false, give a counter-example to demonstrate this. (a) Non-singular N N matrices
More informationWe use the overhead arrow to denote a column vector, i.e., a number with a direction. For example, in three-space, we write
1 MATH FACTS 11 Vectors 111 Definition We use the overhead arrow to denote a column vector, ie, a number with a direction For example, in three-space, we write The elements of a vector have a graphical
More informationCHAPTER 3 BOOLEAN ALGEBRA
CHAPTER 3 BOOLEAN ALGEBRA (continued) This chapter in the book includes: Objectives Study Guide 3.1 Multiplying Out and Factoring Expressions 3.2 Exclusive-OR and Equivalence Operations 3.3 The Consensus
More informationDEPARTMENT OF ELECTRONIC ENGINEERING
DEPARTMENT OF ELECTRONIC ENGINEERING STUDY GUIDE CONTROL SYSTEMS 2 CSYS202 Latest Revision: Jul 2016 Page 1 SUBJECT: Control Systems 2 SUBJECT CODE: CSYS202 SAPSE CODE: 0808253220 PURPOSE: This subject
More informationStat 159/259: Linear Algebra Notes
Stat 159/259: Linear Algebra Notes Jarrod Millman November 16, 2015 Abstract These notes assume you ve taken a semester of undergraduate linear algebra. In particular, I assume you are familiar with the
More informationChapter 3 Transformations
Chapter 3 Transformations An Introduction to Optimization Spring, 2014 Wei-Ta Chu 1 Linear Transformations A function is called a linear transformation if 1. for every and 2. for every If we fix the bases
More informationModule 09 From s-domain to time-domain From ODEs, TFs to State-Space Modern Control
Module 09 From s-domain to time-domain From ODEs, TFs to State-Space Modern Control Ahmad F. Taha EE 3413: Analysis and Desgin of Control Systems Email: ahmad.taha@utsa.edu Webpage: http://engineering.utsa.edu/
More information0.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 informationGROUPS. Chapter-1 EXAMPLES 1.1. INTRODUCTION 1.2. BINARY OPERATION
Chapter-1 GROUPS 1.1. INTRODUCTION The theory of groups arose from the theory of equations, during the nineteenth century. Originally, groups consisted only of transformations. The group of transformations
More informationAssignment #10: Diagonalization of Symmetric Matrices, Quadratic Forms, Optimization, Singular Value Decomposition. Name:
Assignment #10: Diagonalization of Symmetric Matrices, Quadratic Forms, Optimization, Singular Value Decomposition Due date: Friday, May 4, 2018 (1:35pm) Name: Section Number Assignment #10: Diagonalization
More informationChap 4. State-Space Solutions and
Chap 4. State-Space Solutions and Realizations Outlines 1. Introduction 2. Solution of LTI State Equation 3. Equivalent State Equations 4. Realizations 5. Solution of Linear Time-Varying (LTV) Equations
More informationChapter 2: Numeric, Cell, and Structure Arrays
Chapter 2: Numeric, Cell, and Structure Arrays Topics Covered: Vectors Definition Addition Multiplication Scalar, Dot, Cross Matrices Row, Column, Square Transpose Addition Multiplication Scalar-Matrix,
More informationCITS2401 Computer Analysis & Visualisation
FACULTY OF ENGINEERING, COMPUTING AND MATHEMATICS CITS2401 Computer Analysis & Visualisation SCHOOL OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING Topic 7 Matrix Algebra Material from MATLAB for Engineers,
More informationCONTROL SYSTEMS LABORATORY ECE311 LAB 1: The Magnetic Ball Suspension System: Modelling and Simulation Using Matlab
CONTROL SYSTEMS LABORATORY ECE311 LAB 1: The Magnetic Ball Suspension System: Modelling and Simulation Using Matlab 1 Introduction and Purpose The purpose of this experiment is to familiarize you with
More informationAdding and Subtracting Terms
Adding and Subtracting Terms 1.6 OBJECTIVES 1.6 1. Identify terms and like terms 2. Combine like terms 3. Add algebraic expressions 4. Subtract algebraic expressions To find the perimeter of (or the distance
More information= = 3( 13) + 4(10) = = = 5(4) + 1(22) =
. SOLUIONS Notes: If time is needed for other topics, this chapter may be omitted. Section 5. contains enough information about determinants to support the discussion there of the characteristic polynomial
More informationCITS2401 Computer Analysis & Visualisation
FACULTY OF ENGINEERING, COMPUTING AND MATHEMATICS CITS2401 Computer Analysis & Visualisation SCHOOL OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING Topic 7 Matrix Algebra Material from MATLAB for Engineers,
More information3.1 SOLUTIONS. 2. Expanding along the first row: Expanding along the second column:
. SOLUIONS Notes: Some exercises in this section provide practice in computing determinants, while others allow the student to discover the properties of determinants which will be studied in the next
More informationEcon Slides from Lecture 7
Econ 205 Sobel Econ 205 - Slides from Lecture 7 Joel Sobel August 31, 2010 Linear Algebra: Main Theory A linear combination of a collection of vectors {x 1,..., x k } is a vector of the form k λ ix i for
More informationExample 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 informationLinear Algebra: Matrix Eigenvalue Problems
CHAPTER8 Linear Algebra: Matrix Eigenvalue Problems Chapter 8 p1 A matrix eigenvalue problem considers the vector equation (1) Ax = λx. 8.0 Linear Algebra: Matrix Eigenvalue Problems Here A is a given
More informationElementary Linear Algebra
Matrices J MUSCAT Elementary Linear Algebra Matrices Definition Dr J Muscat 2002 A matrix is a rectangular array of numbers, arranged in rows and columns a a 2 a 3 a n a 2 a 22 a 23 a 2n A = a m a mn We
More informationTherefore, A and B have the same characteristic polynomial and hence, the same eigenvalues.
Similar Matrices and Diagonalization Page 1 Theorem If A and B are n n matrices, which are similar, then they have the same characteristic equation and hence the same eigenvalues. Proof Let A and B be
More informationA Review of Linear Algebra
A Review of Linear Algebra Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab: Implementations
More informationReduction to the associated homogeneous system via a particular solution
June PURDUE UNIVERSITY Study Guide for the Credit Exam in (MA 5) Linear Algebra This study guide describes briefly the course materials to be covered in MA 5. In order to be qualified for the credit, one
More informationThe Singular Value Decomposition (SVD) and Principal Component Analysis (PCA)
Chapter 5 The Singular Value Decomposition (SVD) and Principal Component Analysis (PCA) 5.1 Basics of SVD 5.1.1 Review of Key Concepts We review some key definitions and results about matrices that will
More informationGRE Subject test preparation Spring 2016 Topic: Abstract Algebra, Linear Algebra, Number Theory.
GRE Subject test preparation Spring 2016 Topic: Abstract Algebra, Linear Algebra, Number Theory. Linear Algebra Standard matrix manipulation to compute the kernel, intersection of subspaces, column spaces,
More informationEigenvalues and Eigenvectors: An Introduction
Eigenvalues and Eigenvectors: An Introduction The eigenvalue problem is a problem of considerable theoretical interest and wide-ranging application. For example, this problem is crucial in solving systems
More informationEE263: Introduction to Linear Dynamical Systems Review Session 5
EE263: Introduction to Linear Dynamical Systems Review Session 5 Outline eigenvalues and eigenvectors diagonalization matrix exponential EE263 RS5 1 Eigenvalues and eigenvectors we say that λ C is an eigenvalue
More informationChapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form
Chapter 5. Linear Algebra A linear (algebraic) equation in n unknowns, x 1, x 2,..., x n, is an equation of the form a 1 x 1 + a 2 x 2 + + a n x n = b where a 1, a 2,..., a n and b are real numbers. 1
More informationHomework 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 informationMATHEMATICAL MODELING OF CONTROL SYSTEMS
1 MATHEMATICAL MODELING OF CONTROL SYSTEMS Sep-14 Dr. Mohammed Morsy Outline Introduction Transfer function and impulse response function Laplace Transform Review Automatic control systems Signal Flow
More informationLinear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.
Matrices Operations Linear Algebra Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0 The rectangular array 1 2 1 4 3 4 2 6 1 3 2 1 in which the
More informationFundamentals of Matrices
Maschinelles Lernen II Fundamentals of Matrices Christoph Sawade/Niels Landwehr/Blaine Nelson Tobias Scheffer Matrix Examples Recap: Data Linear Model: f i x = w i T x Let X = x x n be the data matrix
More informationQueens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.
Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 8 Lecture 8 8.1 Matrices July 22, 2018 We shall study
More informationMATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra
MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra A. Vectors A vector is a quantity that has both magnitude and direction, like velocity. The location of a vector is irrelevant;
More informationCayley-Hamilton Theorem
Cayley-Hamilton Theorem Massoud Malek In all that follows, the n n identity matrix is denoted by I n, the n n zero matrix by Z n, and the zero vector by θ n Let A be an n n matrix Although det (λ I n A
More informationEE -213 BASIC CIRCUIT ANALYSIS LAB MANUAL
EE -213 BASIC CIRCUIT ANALYSIS LAB MANUAL EE 213 Fall 2009 LABORATORY #1 INTRODUCTION TO MATLAB INTRODUCTION The purpose of this laboratory is to introduce you to Matlab and to illustrate some of its circuit
More informationNotes on Eigenvalues, Singular Values and QR
Notes on Eigenvalues, Singular Values and QR Michael Overton, Numerical Computing, Spring 2017 March 30, 2017 1 Eigenvalues Everyone who has studied linear algebra knows the definition: given a square
More informationIntroduction to Matrix Algebra
Introduction to Matrix Algebra August 18, 2010 1 Vectors 1.1 Notations A p-dimensional vector is p numbers put together. Written as x 1 x =. x p. When p = 1, this represents a point in the line. When p
More informationB553 Lecture 5: Matrix Algebra Review
B553 Lecture 5: Matrix Algebra Review Kris Hauser January 19, 2012 We have seen in prior lectures how vectors represent points in R n and gradients of functions. Matrices represent linear transformations
More informationExamples and MatLab. Vector and Matrix Material. Matrix Addition R = A + B. Matrix Equality A = B. Matrix Multiplication R = A * B.
Vector and Matrix Material Examples and MatLab Matrix = Rectangular array of numbers, complex numbers or functions If r rows & c columns, r*c elements, r*c is order of matrix. A is n * m matrix Square
More informationMODIFIED VERSION OF: An introduction to Matlab for dynamic modeling ***PART 2 *** Last compile: October 3, 2016
MODIFIED VERSION OF: An introduction to Matlab for dynamic modeling ***PART 2 *** Last compile: October 3, 2016 Stephen P. Ellner 1 and John Guckenheimer 2 1 Department of Ecology and Evolutionary Biology,
More informationUnit 3: Matrices. Juan Luis Melero and Eduardo Eyras. September 2018
Unit 3: Matrices Juan Luis Melero and Eduardo Eyras September 2018 1 Contents 1 Matrices and operations 4 1.1 Definition of a matrix....................... 4 1.2 Addition and subtraction of matrices..............
More informationMATRICES The numbers or letters in any given matrix are called its entries or elements
MATRICES A matrix is defined as a rectangular array of numbers. Examples are: 1 2 4 a b 1 4 5 A : B : C 0 1 3 c b 1 6 2 2 5 8 The numbers or letters in any given matrix are called its entries or elements
More informationUNIVERSITI MALAYSIA PERLIS
UNIVERSITI MALAYSIA PERLIS SCHOOL OF COMPUTER & COMMUNICATIONS ENGINEERING EKT 230 SIGNALS AND SYSTEMS LABORATORY MODULE LAB 5 : LAPLACE TRANSFORM & Z-TRANSFORM 1 LABORATORY OUTCOME Ability to describe
More informationUse of Scilab to demonstrate concepts in linear algebra and polynomials
Use of Scilab to demonstrate concepts in linear algebra and polynomials Dr. Madhu N. Belur Control & Computing Department of Electrical Engineering Indian Institute of Technology Bombay Email: belur@ee.iitb.ac.in
More informationreview To find the coefficient of all the terms in 15ab + 60bc 17ca: Coefficient of ab = 15 Coefficient of bc = 60 Coefficient of ca = -17
1. Revision Recall basic terms of algebraic expressions like Variable, Constant, Term, Coefficient, Polynomial etc. The coefficients of the terms in 4x 2 5xy + 6y 2 are Coefficient of 4x 2 is 4 Coefficient
More informationLinear algebra II Tutorial solutions #1 A = x 1
Linear algebra II Tutorial solutions #. Find the eigenvalues and the eigenvectors of the matrix [ ] 5 2 A =. 4 3 Since tra = 8 and deta = 5 8 = 7, the characteristic polynomial is f(λ) = λ 2 (tra)λ+deta
More informationREVIEW Chapter 1 The Real Number System
REVIEW Chapter The Real Number System In class work: Complete all statements. Solve all exercises. (Section.4) A set is a collection of objects (elements). The Set of Natural Numbers N N = {,,, 4, 5, }
More informationProblem Set (T) If A is an m n matrix, B is an n p matrix and D is a p s matrix, then show
MTH 0: Linear Algebra Department of Mathematics and Statistics Indian Institute of Technology - Kanpur Problem Set Problems marked (T) are for discussions in Tutorial sessions (T) If A is an m n matrix,
More informationTOPIC 2 Computer application for manipulating matrix using MATLAB
YOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM TOPIC 2 Computer application for manipulating matrix using MATLAB Definition of Matrices in MATLAB
More information