CD-ROM Appendix E: Matlab
|
|
|
- Grant Skinner
- 10 years ago
- Views:
Transcription
1 CD-ROM Appendix E: Matlab Susan A. Fugett Matlab version 7 or 6.5 is a very powerful tool useful for many kinds of mathematical tasks. For the purposes of this text, however, Matlab 7 or 6.5 will be used only to solve four types of problems: polynomial curve fitting, system of algebraic equations, system of ordinary differential equations, and nonlinear regression. This appendix serves as a quick guide to solving such problems. The solutions were all prepared using the Student Edition of Matlab 7 or 6.5. Please note that the Matlab 7 or 6.5 software must be purchased independently of the CD-ROM accompanying this book. CDE.1 A Quick Tour When Matlab is opened, the command window of the Matlab Student Edition appears: To get started, type one of these commands: helpwin, helpdesk, or demo. You may then type commands at the prompt. Throughout this appendix, different fonts are used to represent Matlab input and output, and italics are used to explain function arguments. CDE.1.1 MATLAB s Method Matlab can range from acting as a calculator to performing complex matrix operations and more. All of Matlab s operations are performed as matrix operations, and every variable is stored in Matlab s memory as a matrix even if it is only 1x1 in size. Therefore, all Matlab input and output will be in matrix form. 1
2 2 Appendices CDE.1.2 Punctuation Matlab is case sensitive and recognizes the difference between capital and lowercase letters. Therefore, it is possible to work with the variables X and x at the same time. The semicolon and period play very important roles in performing calculations using Matlab. A semicolon placed at the end of a command line will suppress restatement of that output. Matlab will still perform the command, but it will not display the answer. For example, type beta=1+4, and Matlab will display the answer beta =5; if you then type alpha = 30/2;, Matlab will not tell you the answer. To see the value of a variable, simply type the name of the variable, alpha, and Matlab will display its value, alpha =15. The command who can also be used to view a list of current variables: Your variables are: alpha beta The period is used when element-by-element matrix multiplication is performed. To perform standard matrix multiplication of two matrices, say A and B, type A*B. To multiply every element of matrix A by 2, type A*2. However, to multiply every element of A with the corresponding element of B, type A.*B. This element-by-element matrix multiplication will be used for the purposes of this text. To learn more about Matlab, type demo at the command prompt; to see a demo about matrix manipulations, type matmanip. CDE.1.3 Help Matlab has an extensive on-line help program that can be accessed through the help command, the lookfor command, and by the helpwin command (or by choosing help from the menu bar). By typing help topic, for example help log, Matlab will give an explanation of the topic. LOG Natural logarithm. LOG(X) is the natural logarithm of the elements of X. Complex results are produced if X is not positive. See also LOG2, LOG10, EXP, LOGM. It is likely that in many instances you will not know the exact name of the topic for which you need help. (By typing helpwin, you will open the help window, which houses a list of help topics.) The lookfor command can be used to search through the help topics for a key word. For example, you could type lookfor logarithm and receive the following list: LOGSPACE LOG LOG10 LOG2 REALLOG BETALN GAMMALN LOGM Logarithmically spaced vector. Natural logarithm. common (base 10) logarithm. Base 2 logarithm and dissect floating point number. Real logarithm. Logarithm of beta function. Logarithm of gamma function. Matrix logarithm.
3 Sec. 3 LOGSIG Logarithmic sigmoid transfer function. LOG Logarithm in a Galois field. log.m: %@FINTS/LOG Overloaded for FINTS object: natural logarithm (log base e). log10.m: %@FINTS/LOG10 Overloaded for FINTS object: common logarithm (log base 10). log2.m: %@FINTS/LOG2 Overloaded for FINTS object: Base 2 logarithm and dissect floating point number. LOG Symbolic matrix element-wise natural logarithm. BLKLOG Defines a function that returns the natural logarithm of the input. from which the search can be narrowed. Please note that all built-in Matlab commands are lowercase, although in help they are displayed in uppercase letters. It is strongly recommended that students take time to explore the demo before attempting to solve problems using Matlab. CDE.1.4 M-files Many of the commands in Matlab are really a combination of commands and manipulations that are stored in an m-file. Users can also write their own m-files with their own commands and data. The m-files are simply text files that have an m extension (e.g., example1.m). The name of the file can then be called upon later to execute the commands in the m-file as though they were being entered line by line by the user at the prompt. The m-file saves time by relieving the user of the need to type lines of commands over and over and by enabling him or her to change values of one or more variables easily and repeatedly. CDE.2 Examples Examples of each of the four types of problems listed earlier will now be explained. Please refer to the examples in the book that were solved using Polymath. It may be wise to type the command clear before starting any new problems to clear the values from all variables in Matlab s memory. CDE.2.1 Polynomial Curve Fitting: Example 2-3 In this example, a third-order polynomial is fit to conversion-rate data. Step 1: First, the data have to be entered as matrices by listing them between brackets, leaving a space between each entry. X=[ ]; ra=[ ];
4 4 Appendices Step 2: Next, the function polyfit is used to fit the data to a third-order polynomial. To learn more about the function polyfit, type help polyfit at the command prompt. p=polyfit(x,ra,3) (matrix of coefficients=polyfit(ind. variable, dep. variable, order of polynomial) p = The coefficients are arranged in decreasing order of the independent variable of the polynomial; therefore, r a = X X X = Please note that the typical mathematical convention for ordering coefficients is y = a 0 + a 1 x + a 2 x a n x n whereas, Matlab returns the solution ordered from a n to a 0. Step 3: Next, a variable f is assigned to evaluate the polynomial at the data points (i.e., f holds the r a values calculated from the equation of the polynomial fit.) Because X is a 1 10 matrix, f will also be 1 10 in size. f=polyval(p,x); f=polyval(matrix of coefficients, ind. variable) To learn more about the function polyval, type help polyval at the command prompt. Step 4: Finally, a plot is prepared to show how well the polynomial fits the data. plot(x,ra,'o',x,f,'-') plot(ind. var., dep. var., symbol, ind. var., f, symbol ) where symbol denotes how the data are to be plotted. In this case, the data set is plotted as circles and the fitted polynomial is plotted as a line. The following commands label and define the scale of the axes. xlabel('x'); ylabel('ra "o", f "-"'); axis([ ]); xlabel( text ); ylabel( text ); axis([xmin xmax ymin ymax]) Please refer to help plot for more information on preparing plots. The variance, or the sum of the squares of the difference between the actual data and the values calculated from the polynomial, can also be calculated. variance=sum((ra-f).^2) variance =1.6014e-008 The command (ra-f) creates a matrix the same size as r a and f and contains the element-by-element subtraction of f from r a. Every element of this new matrix is then squared to create a third matrix. Then, by summing all the elements of this third matrix, the result is a 1x1 matrix, a scalar, equal to the variance.
5 Sec. 5 CDE.2.2 Solving a System of Algebraic Equations: Example 6-8 In Example 6-8, a system of three algebraic equations C H C H0 ( k 1 C H C M k 2 C H ) C M C M0 k 1 C H C M ( k 1 C H C M k 2 C H C X ) C X C X It is very important that the three variables, C H, C M, and C X, be represented by variables of only one character in length (e.g., h, m, and x). is solved for three variables, C H, C M, and C X. Step 1: To solve these equations using Matlab, the constants are declared to be symbolic, the values for the constants are entered in the equations and the equations are entered as eq1, eq2, and eq3 in the following form: (eq1=symbolic equation). h = C H =.021 k 1 = 55.2 m = C M =.0105 k 2 = 30.2 x = C X t = 0.5 syms h m x; eq1=h-.021+(55.2*m*h^ *x*h^0.5)*0.5; eq2=m (55.2*m*h^0.5)*0.5; eq3=(55.2*m*h^ *x*h^0.5)*0.5-x; Step 2: Next, to solve this system of equations, type S=solve(eq1,eq2,eq3); C H0 C M0
6 6 Appendices The answers can be displayed by typing the following commands: S.h ans = e-2 S.m ans = e-2 S.x ans = e-2 Matlab may output an algebraic expression instead of a value. If that happens, type eval(s.h) eval(s.m) eval(s.x) and the numeric values should appear. Therefore, C H = , C M = , and C X = CDE.2.3 Solving a System of Ordinary Differential Equations: Example 4-6 In Example 4-6, a system of two differential equations and one supplementary equation dx ( ) rate ; dw ( ) fa0 was solved using Polymath. Using Matlab to solve this problem requires two steps: (1) Create an m-file containing the equations, and (2) use the Matlab ode45 command to integrate numerically the equations stored in the m-file created in step 1. Part 1: Solving for X and y dy ( ) = alpha ( ; 1 eps X) dw ( ) 2y f 1 eps X y Step 1: To begin, choose New from the File menu and select M-file. A new text editor window will appear; the commands of the m-file are to be written there. Step 2: Write the m-file. The m-file for this example may be divided into four parts. Part 1: The first part contains only comments and information for the user or future users. Each comment line begins with a percent sign because Matlab ignores the rest of a line following %. Part 2: The second part is the function command, which must be the first line in the m-file that is not a comment line. This command assigns a new function to the name of the m-file. The new function is composed of any combination of existing commands and functions from Matlab. The information and commands that define the new function must be saved in a file whose name is the same as that of the new function.
7 Sec. 7 Part 3: The third part of the m-file contains all other information and auxiliary equations used to solve the differential equations. It may also include the global command that allows the value for variables to be passed into or out of the m-file. Part 4: The final part of the m-file contains the differential equations to be solved. Matlab requires that the variables of the ODEs be the elements of a single column vector. Therefore, a vector x is defined such that, for N variables, x = [var1; var2; var3;...; varn] or x(1) = var1, x(2) = var2, x(n) = varn. In the case of Example 4-6, var1=x and var2=y. Step 3: Save the m-file under the name LEP_4_6.m. This file must be saved in a directory in Matlab's path. The path is the list of places Matlab looks to find the files it needs. To see the current path, to add a directory temporarily to the path, or to change the path permanently, use the pathtool command. Step 4: To see the m-file, type type LEP_4_6 This command tells Matlab to type the m-file named LEP_4_6. Step 5: Now to solve the problem, the initial conditions need to be entered from the command window. A matrix called ic is defined to hold the initial conditions of x(1) and x(2), respectively, and wspan is used to define the range of the independent variable. ic=[0;1]; wspan = [0 60]; Step 6: The global command is also repeated from the command window. global eps kprime Step 7: Finally, we will use the ode45 built-in function. This function numerically integrates the set of differential equations saved in an m-file. [w,x]=ode45('lep_4_6',wspan,ic); [ind. var., dep. var.] = ode45( m-file, range of ind. variable, initial conditions of dep. variables) Lines beginning with % are comments and are ignored by Matlab. The comment lines are used to explain the variables in the m-file. This line assigns the function xdot to the m-file LEP_4_6 (in this case w is the independent variable, and x is the dependent variable). This line tells Matlab to allow the value for the variables eps and kprime to be passed outside the m-file. % Part 1 % LEP _4_6 % m-file to solve example 4-6 % % x(1)=x % x(2)=y % xdot(1)=dx/dw, xdot(2)=dy/dw %Part 2 function xdotlep_4_6 (w,x) global eps kprime
8 8 Appendices These lines provide important information necessary to solve the problem. % Part 3 kprime=0.0266; eps=-0.15; alpha=0.0166, rate=kprime*((1-x(1))/(1+eps*x(1))) *x(2); fa0=1 %Part 4 xdot(1, :)=rate/fa0; xdot(2, :)=-alpha*(1+eps*x(1))/(2*x(2)); These lines are the equations for ODEs to be solved. Matlab requires that the variables of the ODE s be assigned to one column vector. Therefore, a vector x is defined such that x(1) = X and x(2) = y. Also, xdot is the derivative of x. For more information, type help ode45 at the command prompt. Part 2: Evaluating Variables not Contained in the Solution Matrix Step 1: We want to solve for f, which is not contained in the solution matrix, x, but is a function of part of the solution matrix. To see the size of the matrix x, we type size(x). This returns the following: ans = Therefore, x is a 57 by 2 matrix of the form: x x1( 1) x2( 2) x1( 2) x2( 2) x1( 3) x2( 3) M M x1( 57)x2( 57) Step 2: Next we need to write the equation for f in terms of the x matrix. Using Matlab notation, x(1:z,1:y) represents rows 1 through z and columns 1 through y of the matrix x. Similarly, x(1:57,1) represents all the rows in the first column of the x matrix, which in our case is X. Similarly x(1:57,2) defines the second column, y. The notation x( :, 1) also defines all the rows in the first column of the x matrix. This is usually more convenient than sizing the matrix, but at times, only part of the solution matrix may be needed. For example, you may want to plot only part of the solution. So, we can write the formula (f=(1+eps*x/y) in the following way: f=(1+eps.*x(:,1))./x(:,2); And we can write the formula for rate as follows: x(row 1:row n, column 1:column n) X = x(1:57,1:1) = x(1:57,1) y = x(1:57,2:2) = x(1:57,2) Multiplication and division signs are preceded by a period to denote element-by-element operations as described in the Quick Tour. (The operation is performed on every element in the matrix.) rate=kprime.*((1-x(:,1))./(1+eps.*x(:,1))).*x(:,2);
9 Sec. 9 Note: This is why we used the global command. We needed the values for eps and kprime to solve for rate and f. Step 3: A plot can then be made displaying the results of the computation. To plot X, y, and f as a function of w : plot(w,x,w,f); plot(ind. var., dep. var., ind. var., dep. var.); title('example 4.6');xlabel('w (lb)');ylabel('x,y,f') Since the solution matrix x contains two sets of data (two columns) and f contains one column, the plot should display three lines. Example 4-6 To plot the rate, type plot(w,rate);title('example 4.6;xlabel('w (lb)');ylabel('rate'); Example 4-6
10 10 Appendices CDE.2.4 Solving a System of Ordinary Differential Equations: Example CDR4-1 To review what you learned about Example 4-6, please examine Example CDR4-1. type CDR4-1 % "CDR4-1" % m-file to solve CDR4-1 % % x(1)=x % x(2)=y % xdot(1)=dx/dz, xdot(2)=dy/dz function xdot=ex4_8(z,x) Fa0=440; P0=2000; Ca0=0.32; R=30; phi=0.4; kprime=0.02; L=27; rhocat=2.6; m=44; Ca=Ca0*(1-x(1))*x(2)/(1+x(1)); Ac=pi*(R^2-(z-L)^2); V=pi*(z*R^2-1/3*(z-L)^3-1/3*L^3); G=m/Ac; ra=-kprime*ca*rhocat*(1-phi); beta=(98.87*g+25630*g^2)*0.01; W=rhocat*(1-phi)*V; xdot(1,:)=-ra*ac/fa0; xdot(2,:)=-beta/p0/x(2)*(1+x(1)); Now, from the command window enter ic=[0;1]; zspan = [0 54]; [z,x]=ode45('ex4_8',zspan,ic); plot(z,x);title('example4.8');xlabel('z(dm)') ;ylabel('x,y'); axis([ ])
11 Sec. 11 Example CDR4-1 CDE.2.5 Nonlinear Regression: Example 10-4 In this example, rate-pressure data are fit to four rate equations to evaluate the rate constants. These fits are then compared to determine the best rate equation for the data. To accomplish this, an m-file is required to compute the least-squares regression for the data. Only part (a) of Example 10-4 will be demonstrated here. The rate equation for part (a) is r a kp E P H K A P EA K E P E
12 12 Appendices Step 1: Write the m-file. The structure of this m-file is very similar to the m-file for Example 4-6. Please refer to Example 4-6 for comparison and further explanation. f must have an initial value. Therefore, it is given a value of 0 before the for loop to initiate the sum at zero. The function f is assigned to the m-file % LEP_10_4a % m-file to perform least-squares regression Example 10-4 rate a % x(1)=k; x(2)=ke; x(3)=ka function f=lep_10_4a(x) global ra pe pea ph2 n f=0 for i=l:n f=f+(ra(i)-(x(1)*pe(i)*ph2(i))/(1+x(3)*pea(i)+x (2)*pe(i)))^2; end ra=[ ] pe=[ ] pea-[ ] ph2=[ ]; n=9; This "for" loop calculates the square of the difference between the actual rate and the proposed rate equation. The result of the loop is the sum of the squares we are trying to minimize and is saved in the variable f. This equation will be different for each rate law. n f ( r aactual r acalculated ) 2 1 Step 2: To perform the least-squares regression for the data, the fmins command is used to find the values of the constants that minimize the value of f. Type help fminsearch for more information. xo=[1 1 1]; x=fminsearch('lep_10_4',xo) dep. variable = fminsearch( m-file,[matrix of initial guesses]) The solution is x = Therefore, k = 3.35; K E = 2.21; and K A = Step 3: To see how closely the solution fits the data, look at the sum of the squares to see the final value of f for the solution in Step 2. Assign to the variable residual the final value of f: residual=lep_10_4(x) residual = The sum of the squares (σ 2 ) is
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
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. [email protected] Course Objective This course provides
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
Beginner s Matlab Tutorial
Christopher Lum [email protected] 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
Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering
Engineering Problem Solving and Excel EGN 1006 Introduction to Engineering Mathematical Solution Procedures Commonly Used in Engineering Analysis Data Analysis Techniques (Statistics) Curve Fitting techniques
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
Signal Processing First Lab 01: Introduction to MATLAB. 3. Learn a little about advanced programming techniques for MATLAB, i.e., vectorization.
Signal Processing First Lab 01: Introduction to MATLAB Pre-Lab and Warm-Up: You should read at least the Pre-Lab and Warm-up sections of this lab assignment and go over all exercises in the Pre-Lab section
(!' ) "' # "*# "!(!' +,
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
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
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
MBA Jump Start Program
MBA Jump Start Program Module 2: Mathematics Thomas Gilbert Mathematics Module Online Appendix: Basic Mathematical Concepts 2 1 The Number Spectrum Generally we depict numbers increasing from left to right
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
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
Calibration and Linear Regression Analysis: A Self-Guided Tutorial
Calibration and Linear Regression Analysis: A Self-Guided Tutorial Part 1 Instrumental Analysis with Excel: The Basics CHM314 Instrumental Analysis Department of Chemistry, University of Toronto Dr. D.
Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial VI
Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial VI Solving a System of Linear Algebraic Equations (last updated 5/19/05 by GGB) Objectives:
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
15.062 Data Mining: Algorithms and Applications Matrix Math Review
.6 Data Mining: Algorithms and Applications Matrix Math Review The purpose of this document is to give a brief review of selected linear algebra concepts that will be useful for the course and to develop
NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )
Chapter 340 Principal Components Regression Introduction is a technique for analyzing multiple regression data that suffer from multicollinearity. When multicollinearity occurs, least squares estimates
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
Forecasting in STATA: Tools and Tricks
Forecasting in STATA: Tools and Tricks Introduction This manual is intended to be a reference guide for time series forecasting in STATA. It will be updated periodically during the semester, and will be
PGR Computing Programming Skills
PGR Computing Programming Skills Dr. I. Hawke 2008 1 Introduction The purpose of computing is to do something faster, more efficiently and more reliably than you could as a human do it. One obvious point
Typical Linear Equation Set and Corresponding Matrices
EWE: Engineering With Excel Larsen Page 1 4. Matrix Operations in Excel. Matrix Manipulations: Vectors, Matrices, and Arrays. How Excel Handles Matrix Math. Basic Matrix Operations. Solving Systems of
Linear Algebra: Vectors
A Linear Algebra: Vectors A Appendix A: LINEAR ALGEBRA: VECTORS TABLE OF CONTENTS Page A Motivation A 3 A2 Vectors A 3 A2 Notational Conventions A 4 A22 Visualization A 5 A23 Special Vectors A 5 A3 Vector
Exercise 1.12 (Pg. 22-23)
Individuals: The objects that are described by a set of data. They may be people, animals, things, etc. (Also referred to as Cases or Records) Variables: The characteristics recorded about each individual.
Curve Fitting, Loglog Plots, and Semilog Plots 1
Curve Fitting, Loglog Plots, and Semilog Plots 1 In this MATLAB exercise, you will learn how to plot data and how to fit lines to your data. Suppose you are measuring the height h of a seedling as it grows.
Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart
Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart Overview Due Thursday, November 12th at 11:59pm Last updated
Scatter Plot, Correlation, and Regression on the TI-83/84
Scatter Plot, Correlation, and Regression on the TI-83/84 Summary: When you have a set of (x,y) data points and want to find the best equation to describe them, you are performing a regression. This page
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
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
I. Turn it on: Press É
Graphing Calculator Guide for the TI-83/84 Plus The following pages describe how to use the calculator to graph functions, use some of the matrix menu, use scientific notation, and other various keys.
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:
Unit 7 Quadratic Relations of the Form y = ax 2 + bx + c
Unit 7 Quadratic Relations of the Form y = ax 2 + bx + c Lesson Outline BIG PICTURE Students will: manipulate algebraic expressions, as needed to understand quadratic relations; identify characteristics
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
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
The KaleidaGraph Guide to Curve Fitting
The KaleidaGraph Guide to Curve Fitting Contents Chapter 1 Curve Fitting Overview 1.1 Purpose of Curve Fitting... 5 1.2 Types of Curve Fits... 5 Least Squares Curve Fits... 5 Nonlinear Curve Fits... 6
How To Use Matlab
INTRODUCTION TO MATLAB FOR ENGINEERING STUDENTS David Houcque Northwestern University (version 1.2, August 2005) Contents 1 Tutorial lessons 1 1 1.1 Introduction.................................... 1 1.2
EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.
EXCEL Tutorial: How to use EXCEL for Graphs and Calculations. Excel is powerful tool and can make your life easier if you are proficient in using it. You will need to use Excel to complete most of your
Programming Exercise 3: Multi-class Classification and Neural Networks
Programming Exercise 3: Multi-class Classification and Neural Networks Machine Learning November 4, 2011 Introduction In this exercise, you will implement one-vs-all logistic regression and neural networks
Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.
Excel Tutorial Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information. Working with Data Entering and Formatting Data Before entering data
2. Simple Linear Regression
Research methods - II 3 2. Simple Linear Regression Simple linear regression is a technique in parametric statistics that is commonly used for analyzing mean response of a variable Y which changes according
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:
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
MatLab Basics. Now, press return to see what Matlab has stored as your variable x. You should see:
MatLab Basics MatLab was designed as a Matrix Laboratory, so all operations are assumed to be done on matrices unless you specifically state otherwise. (In this context, numbers (scalars) are simply regarded
Curve Fitting. Before You Begin
Curve Fitting Chapter 16: Curve Fitting Before You Begin Selecting the Active Data Plot When performing linear or nonlinear fitting when the graph window is active, you must make the desired data plot
Academic Support Center. Using the TI-83/84+ Graphing Calculator PART II
Academic Support Center Using the TI-83/84+ Graphing Calculator PART II Designed and Prepared by The Academic Support Center Revised June 2012 1 Using the Graphing Calculator (TI-83+ or TI-84+) Table of
A Guide to MATLAB for Chemical Engineering Problem Solving
A Guide to MATLAB for Chemical Engineering Problem Solving (ChE465 Kinetics and Reactor Design) Kip D. Hauch Dept. of Chemical Engineering University of Washington About this Manual...1 I. General Introduction...2
MATLAB Tutorial. Chapter 6. Writing and calling functions
MATLAB Tutorial Chapter 6. Writing and calling functions In this chapter we discuss how to structure a program with multiple source code files. First, an explanation of how code files work in MATLAB is
Question 2: How do you solve a matrix equation using the matrix inverse?
Question : How do you solve a matrix equation using the matrix inverse? In the previous question, we wrote systems of equations as a matrix equation AX B. In this format, the matrix A contains the coefficients
STATISTICS AND DATA ANALYSIS IN GEOLOGY, 3rd ed. Clarificationof zonationprocedure described onpp. 238-239
STATISTICS AND DATA ANALYSIS IN GEOLOGY, 3rd ed. by John C. Davis Clarificationof zonationprocedure described onpp. 38-39 Because the notation used in this section (Eqs. 4.8 through 4.84) is inconsistent
MATHEMATICS FOR ENGINEERING BASIC ALGEBRA
MATHEMATICS FOR ENGINEERING BASIC ALGEBRA TUTORIAL 3 EQUATIONS This is the one of a series of basic tutorials in mathematics aimed at beginners or anyone wanting to refresh themselves on fundamentals.
Tutorial on Using Excel Solver to Analyze Spin-Lattice Relaxation Time Data
Tutorial on Using Excel Solver to Analyze Spin-Lattice Relaxation Time Data In the measurement of the Spin-Lattice Relaxation time T 1, a 180 o pulse is followed after a delay time of t with a 90 o pulse,
Modeling with Python
H Modeling with Python In this appendix a brief description of the Python programming language will be given plus a brief introduction to the Antimony reaction network format and libroadrunner. Python
PSTricks. pst-ode. A PSTricks package for solving initial value problems for sets of Ordinary Differential Equations (ODE), v0.7.
PSTricks pst-ode A PSTricks package for solving initial value problems for sets of Ordinary Differential Equations (ODE), v0.7 27th March 2014 Package author(s): Alexander Grahn Contents 2 Contents 1 Introduction
KSTAT MINI-MANUAL. Decision Sciences 434 Kellogg Graduate School of Management
KSTAT MINI-MANUAL Decision Sciences 434 Kellogg Graduate School of Management Kstat is a set of macros added to Excel and it will enable you to do the statistics required for this course very easily. To
Solving ODEs in Matlab. BP205 M.Tremont 1.30.2009
Solving ODEs in Matlab BP205 M.Tremont 1.30.2009 - Outline - I. Defining an ODE function in an M-file II. III. IV. Solving first-order ODEs Solving systems of first-order ODEs Solving higher order ODEs
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
Programming in MATLAB
University of Southern Denmark An introductory set of notes Programming in MATLAB Authors: Nicky C. Mattsson Christian D. Jørgensen Web pages: imada.sdu.dk/ nmatt11 imada.sdu.dk/ chjoe11 November 10, 2014
Maple Quick Start. Introduction. Talking to Maple. Using [ENTER] 3 (2.1)
Introduction Maple Quick Start In this introductory course, you will become familiar with and comfortable in the Maple environment. You will learn how to use context menus, task assistants, and palettes
Matrix Algebra in R A Minimal Introduction
A Minimal Introduction James H. Steiger Department of Psychology and Human Development Vanderbilt University Regression Modeling, 2009 1 Defining a Matrix in R Entering by Columns Entering by Rows Entering
Math 1050 Khan Academy Extra Credit Algebra Assignment
Math 1050 Khan Academy Extra Credit Algebra Assignment KhanAcademy.org offers over 2,700 instructional videos, including hundreds of videos teaching algebra concepts, and corresponding problem sets. In
1 2 3 1 1 2 x = + x 2 + x 4 1 0 1
(d) If the vector b is the sum of the four columns of A, write down the complete solution to Ax = b. 1 2 3 1 1 2 x = + x 2 + x 4 1 0 0 1 0 1 2. (11 points) This problem finds the curve y = C + D 2 t which
Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the 2012-13 school year.
This document is designed to help North Carolina educators teach the Common Core (Standard Course of Study). NCDPI staff are continually updating and improving these tools to better serve teachers. Algebra
(!' ) "' # "*# "!(!' +,
Normally, when single line commands are entered, MATLAB processes the commands immediately and displays the results. MATLAB is also capable of processing a sequence of commands that are stored in files
LAYOUT OF THE KEYBOARD
Dr. Charles Hofmann, LaSalle [email protected] Dr. Roseanne Hofmann, MCCC [email protected] ------------------------------------------------------------------------------------------------- DISPLAY CONTRAST
KaleidaGraph Quick Start Guide
KaleidaGraph Quick Start Guide This document is a hands-on guide that walks you through the use of KaleidaGraph. You will probably want to print this guide and then start your exploration of the product.
CHAPTER 8 FACTOR EXTRACTION BY MATRIX FACTORING TECHNIQUES. From Exploratory Factor Analysis Ledyard R Tucker and Robert C.
CHAPTER 8 FACTOR EXTRACTION BY MATRIX FACTORING TECHNIQUES From Exploratory Factor Analysis Ledyard R Tucker and Robert C MacCallum 1997 180 CHAPTER 8 FACTOR EXTRACTION BY MATRIX FACTORING TECHNIQUES In
3.2 Sources, Sinks, Saddles, and Spirals
3.2. Sources, Sinks, Saddles, and Spirals 6 3.2 Sources, Sinks, Saddles, and Spirals The pictures in this section show solutions to Ay 00 C By 0 C Cy D 0. These are linear equations with constant coefficients
MATLAB LECTURE NOTES. Dr. ADİL YÜCEL. Istanbul Technical University Department of Mechanical Engineering
MATLAB LECTURE NOTES Dr. ADİL YÜCEL Istanbul Technical University Department of Mechanical Engineering MATLAB LECTURE NOTES Student Name Student ID Dr. ADİL YÜCEL Istanbul Technical University Department
Review of Matlab for Differential Equations. Lia Vas
Review of Matlab for Differential Equations Lia Vas 1. Basic arithmetic (Practice problems 1) 2. Solving equations with solve (Practice problems 2) 3. Representing functions 4. Graphics 5. Parametric Plots
AP Physics 1 and 2 Lab Investigations
AP Physics 1 and 2 Lab Investigations Student Guide to Data Analysis New York, NY. College Board, Advanced Placement, Advanced Placement Program, AP, AP Central, and the acorn logo are registered trademarks
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 +
Prentice Hall Mathematics: Algebra 2 2007 Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)
Core Standards of the Course Standard 1 Students will acquire number sense and perform operations with real and complex numbers. Objective 1.1 Compute fluently and make reasonable estimates. 1. Simplify
To get started, type one of these: helpwin, helpdesk, or demo. For product information, type tour or visit www.mathworks.com.
To get started, type one of these: helpwin, helpdesk, or demo. For product information, type tour or visit www.mathworks.com.» help ode45 version 5 wording ODE45 Solve non-stiff differential equations,
Introduction to Matrix Algebra
Psychology 7291: Multivariate Statistics (Carey) 8/27/98 Matrix Algebra - 1 Introduction to Matrix Algebra Definitions: A matrix is a collection of numbers ordered by rows and columns. It is customary
Version 1.5 Satlantic Inc.
SatCon Data Conversion Program Users Guide Version 1.5 Version: 1.5 (B) - March 09, 2011 i/i TABLE OF CONTENTS 1.0 Introduction... 1 2.0 Installation... 1 3.0 Glossary of terms... 1 4.0 Getting Started...
MATLAB MANUAL AND INTRODUCTORY TUTORIALS
MATLAB MANUAL AND INTRODUCTORY TUTORIALS Ivan Graham, with some revisions by Nick Britton, Mathematical Sciences, University of Bath February 9, 2005 This manual provides an introduction to MATLAB with
Orthogonal Diagonalization of Symmetric Matrices
MATH10212 Linear Algebra Brief lecture notes 57 Gram Schmidt Process enables us to find an orthogonal basis of a subspace. Let u 1,..., u k be a basis of a subspace V of R n. We begin the process of finding
Gamma Distribution Fitting
Chapter 552 Gamma Distribution Fitting Introduction This module fits the gamma probability distributions to a complete or censored set of individual or grouped data values. It outputs various statistics
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,
Review of Fundamental Mathematics
Review of Fundamental Mathematics As explained in the Preface and in Chapter 1 of your textbook, managerial economics applies microeconomic theory to business decision making. The decision-making tools
Supplementary PROCESS Documentation
Supplementary PROCESS Documentation This document is an addendum to Appendix A of Introduction to Mediation, Moderation, and Conditional Process Analysis that describes options and output added to PROCESS
Simple Regression Theory II 2010 Samuel L. Baker
SIMPLE REGRESSION THEORY II 1 Simple Regression Theory II 2010 Samuel L. Baker Assessing how good the regression equation is likely to be Assignment 1A gets into drawing inferences about how close the
(1) S = R, where S is the sum, i is the rate of interest per compounding
Solving Annuity Formulas for Interest Rate Iterative Routines on the TI 83/84 Floyd Vest Basic to mathematics of finance is the formula for the sum of an ordinary annuity. The formula in traditional terminology
Matrix Differentiation
1 Introduction Matrix Differentiation ( and some other stuff ) Randal J. Barnes Department of Civil Engineering, University of Minnesota Minneapolis, Minnesota, USA Throughout this presentation I have
Tim Kerins. Leaving Certificate Honours Maths - Algebra. Tim Kerins. the date
Leaving Certificate Honours Maths - Algebra the date Chapter 1 Algebra This is an important portion of the course. As well as generally accounting for 2 3 questions in examination it is the basis for many
Algebra I Vocabulary Cards
Algebra I Vocabulary Cards Table of Contents Expressions and Operations Natural Numbers Whole Numbers Integers Rational Numbers Irrational Numbers Real Numbers Absolute Value Order of Operations Expression
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
Computational Mathematics with Python
Boolean Arrays Classes Computational Mathematics with Python Basics Olivier Verdier and Claus Führer 2009-03-24 Olivier Verdier and Claus Führer Computational Mathematics with Python 2009-03-24 1 / 40
Figure 1. An embedded chart on a worksheet.
8. Excel Charts and Analysis ToolPak Charts, also known as graphs, have been an integral part of spreadsheets since the early days of Lotus 1-2-3. Charting features have improved significantly over the
JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson
JUST THE MATHS UNIT NUMBER 1.8 ALGEBRA 8 (Polynomials) by A.J.Hobson 1.8.1 The factor theorem 1.8.2 Application to quadratic and cubic expressions 1.8.3 Cubic equations 1.8.4 Long division of polynomials
Introduction to Logistic Regression
OpenStax-CNX module: m42090 1 Introduction to Logistic Regression Dan Calderon This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 3.0 Abstract Gives introduction
CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA
We Can Early Learning Curriculum PreK Grades 8 12 INSIDE ALGEBRA, GRADES 8 12 CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA April 2016 www.voyagersopris.com Mathematical
Equations, Inequalities & Partial Fractions
Contents Equations, Inequalities & Partial Fractions.1 Solving Linear Equations 2.2 Solving Quadratic Equations 1. Solving Polynomial Equations 1.4 Solving Simultaneous Linear Equations 42.5 Solving Inequalities
Variance Reduction. Pricing American Options. Monte Carlo Option Pricing. Delta and Common Random Numbers
Variance Reduction The statistical efficiency of Monte Carlo simulation can be measured by the variance of its output If this variance can be lowered without changing the expected value, fewer replications
Scalar Valued Functions of Several Variables; the Gradient Vector
Scalar Valued Functions of Several Variables; the Gradient Vector Scalar Valued Functions vector valued function of n variables: Let us consider a scalar (i.e., numerical, rather than y = φ(x = φ(x 1,
Curve Fitting and Parameter Estimation
Curve Fitting and Parameter Estimation Glenn Lahodny Jr. Spring 2015 1 Least Squares Regression The first step of the modeling process often consists of simply looking at data graphically and trying to
COLLEGE ALGEBRA. Paul Dawkins
COLLEGE ALGEBRA Paul Dawkins Table of Contents Preface... iii Outline... iv Preliminaries... Introduction... Integer Exponents... Rational Exponents... 9 Real Exponents...5 Radicals...6 Polynomials...5
α = u v. In other words, Orthogonal Projection
Orthogonal Projection Given any nonzero vector v, it is possible to decompose an arbitrary vector u into a component that points in the direction of v and one that points in a direction orthogonal to v
