New Mexico Tech Hyd 510

Size: px
Start display at page:

Download "New Mexico Tech Hyd 510"

Transcription

1 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 vector is a vector with magnitude = 1 Vectors are usually identified by a lower case letter. To differentiate between scalar and vector variables, vectors are identified in boldface, such as a, or with an arrow a r above the vector name. When writing by hand they are often indicated by underline a or sometimes an overline a ; some printed papers/books also use these notations. In mechanics, i, j, k are unit vectors in the Cartesian x-, y-, and -directions, respectively. Other notation for Cartesian unit vectors includes n x, n y, n. Example: Suppose a is a 2 dimensional vector, in particular let a = 2 i + 3 j Then, a is a vector of magnitude 2 in the x-direction and 3 in the y-direction. In an x-y plot, it could be drawn as an arrow with its tail at the origin and its head at coordinate (2,3). But vectors aren t tied to an origin, so a could also be drawn as an arrow with is tail at (5,5) and its head at (7,8). In other words, the position of the tail is arbitrary, but the magnitude and direction of the vector is fixed. The vector a can also be written as (2,3). Vector Operations Define: where a = α 1 i + α 2 j + α 3 k b = β 1 i + β 2 j + β 3 k, α 1, α 2, α 3, β 1, β 2, and β 3 are scalars Scalar multiplication: c a = c α 1 i + c α 2 j + c α 3 k, where c is a scalar (result is a vector) Addition: a + b = (α 1 + β 1 ) i + (α 2 + β 2 ) j + (α 3 + β 3 ) k (result is a vector) Subtraction: a - b = (α 1 - β 1 ) i + (α 2 - β 2 ) j + (α 3 - β 3 ) k (result is a vector) Magnitude a = ( α α α 2 3 ) 1/2 (result is a scalar) Dot (Scalar) Product a. b = α 1 β 1 + α 2 β 2 + α 3 β 3 = a b cos θ where θ is the angle between the vectors (result is a scalar) -1.1-

2 Arrays An array is an ordered list of data, often referred to as a vector, as we and Matlab will do. We ve already seen how a vector in mechanics can be written as an array. The vector a in the example on the previous page can be written as a two-dimensional array (2,3), or if you prefer [2,3], which is used in Matlab. But other information can also be written as an array. Here are some examples. Example 1: Suppose we measure water level in a well at eleven different times. We can define a time array, t, that contains the 11 sampling times, and a head array, h, that contains the 11 water levels. So we might have: t = [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0] (in hours) h = [10.0, 9.90, 9.81, 9.75, 9.70, 9.66, 9.64, 9.63, , 9.62] (in feet) Here we have two (11-dimensional) row vectors, t and h. Time is the independent variable and head in the dependent variable. For each time in the t vector, we have a corresponding water level in the h vector; therefore the order of the data in each vector is important. For example, at t=2.0 hr. the water level h=9.70 ft, corresponding to the fifth entry in each vector. Arrays can be organied as rows, as above, or in columns. If we take the transpose of t and h we get column vectors t = M ; h = M Example 2: Suppose that we examine a transect across the landscape and measure topographic elevation,, vegetation density, d, and soil moisture, θ, at N locations (i.e., N = the number of locations). Let x denote the horiontal position along the transect. Then all three metrics vary with x, that is, they are functions of position x. However, we don t have complete functions, only values at the N discrete locations. We then represent this data set by four N-dimensional arrays with corresponding data: x = [ x 1, x 2, x 3,, x N-1, x N ] = [ 1, 2, 3,, N-1, N ] d = [ d 1, d 2, d 3,, d N-1, d N ] θ = [θ 1, θ 2, θ 3,, θ N-1, θ N ] This data could be organied in the form of a matrix, with four rows representing, respectively, the location and the three metrics, and with N columns representing the data. x x = d d θ 1 1 x d 2 2 x d 3 3 L L L d N 1 N N 1 θ1 θ2 θ3 L θ N 1 x xn N d N θ N We describe matrix dimensions as the number of rows by the number of columns. Here we have a (4 N) matrix on the right hand side (RHS), and a (4 1) column vector (of vectors) on the LHS

3 Example 3: Suppose that you have a continuous mathematical function, c(x), representing solute concentration over space in flowing system, with space described by a Cartesian coordinate, x. You wish to plot this function, in order to make a presentation, but your plotting program, like all plotting programs, can t handle a continuous function. It requires you to translate your continuous function into discrete values at a discrete number of points. Thus you select a set of n spatial locations at which you determine the value of c, and feed this to the plotting program. The n spatial locations are given by the vector x = [ x 1, x 2, x 3,, x n-1, x n ], while the associated values of c are given by c = [ c 1, c 2, c 3,, c n-1, c n ]. The program then plots the values c i (x i ), i=1,2,, n, and interpolates between them. The most general plotting programs (especially in two or three dimensions) have two steps. The first is deciding where to locate the points x i. The second is to interpolate c between the points. The simplest location algorithm is to uniformly space the points x i. That is what we mostly do this semester. The simplest interpolation scheme is to draw a straight line between points, that is, to linearly interpolate. As long as the points are located very close to each other these simple steps are adequate. Adaptive schemes put more points where the action is, that is, where the function is changing rapidly (i.e., where the derivative is sufficient different from ero). More sophisticated interpolations use higher order polynominals, splines, or other methods. Suppose that c(x) = c erfc(x-5)], where x is in meters. Then sample the complementary error function between 0 and 10, say at 21 points. (Why did I pick 21 points instead of, say, 20 points?) The result, expressed as the ratio of c/c 0 is given by the table and graph: x (m) c/c e e e e e-13 Relative Concentration Flow Solute Plume Plume front Sampled value Distance, m Where did this come from? Matlab: > x=linspace(0,10,21); c = 0.5*erfc(x-5); plot(x,c,'o') -1.3-

4 BASIC MATLAB MATLAB command structure: > varname = command; where > denotes the command line prompt, varname is the name of the variable to be assigned, and command is the MATLAB command. If no varname is specified, the default is ans. If the semi-colon is omitted, the result is displayed. Some commands contain calls to functions that require input variables. For example, the function sqrt takes the square root of the number that is inputted to it. All input variables are enclosed in parentheses; order is important. Input variable can be numbers or variables. Comments can be added on separate lines, or at the end of a line, by preceeding it with the symbol %. Examples: > a = 7.2; > b=a+5.1; > c=b/4.6+(a-1)*8-(a*b)^2; > d=cos(1.57)-sqrt(c*b/a); > e = [1,2,3]; % this defines an array (row vector) e with elements 1, 2, and 3. > f = [3,2,1]; > g=e+f; % if two vectors have the same number of elements, they % can be added or subtracted using + and - >h= e ; % this transposes the row vector into a column vector Some Basic Commands: whos - prints a list of all variables and their sie help - prints a list of help categories help command - prints help for command (e.g. > help sqrt ) plot - makes an x-y plot of data (requires input) quit - exits Matlab sie - displays the sie of the variable (requires input) linspace - generates an array of evenly spaced numbers (requires input) title - adds a graph title (requires input) xlabel - adds a label to the x-axis of a plot (requires input) hold on - freees the plot so that additional data can be plotted on the same plot hold off - unfreees the plot % - comment line Script files: A sequence of Matlab commands and comments can be saved as a script file, called an m-file, and can be reused. In essence, an m-file is a simple program. Some advantages of using a script m-file instead of the command line are (1) the program can be run many times without re-entering the commands; (2) if you have errors, it is easier to edit and debug the program; and (3) the program is not removed from memory when you exit Matlab

5 MATLAB Exercise 1 For each of the following turn in an m-file. When asked for discussion or explanation, include it as a comment(s) in the m-file. You files should be named 1_#_lastname.m (the.m is added automatically by Matlab), where the 1 refers to this exercise number, # is the problem number (below, 1 to 6), and lastname is your last name. 1.1 Solving a vector problem Darcy s law states that the specific discharge [ms -1 ] vector, q, in a porous media is a linear function of the hydraulic gradient vector, h [-], or q = -K h where porous media hydraulic conductivity K [ms -1 ] is a scalar proportionality coefficient. Specific discharge is the rate (and direction) at which water moves through the porous media (discharge per unit area per unit time). Hydraulic conductivity describes the resistance to flow (resistance = K -1 ). The hydraulic gradient provides the driving force. If a non-reactive tracer or contaminant is introduced into the porous media it will move with the flow at the average linear (seepage) velocity, v = q /n, where n= effective porosity is a scalar. Suppose that there is two-dimensional flow with gradient h = 0.03 i j. The porous media has conductivity K = 1 ft/d and porosity n = Use Matlab for the following calculations. a. Calculate vector q b. Calculate the average linear (seepage) velocity vector, v. c. What is the magnitude of velocity, v? d. What is the direction of velocity (assume 0 deg is east, 90 deg is north)? 1.2. Plotting data Build the vectors t and h in example 1 (p. 1.2) and plot h as a function of t. Use a symbol for h. Do not connect the symbols with lines. Label the axes and title the graph Plotting multiple functions Build the vectors x,, d, and θ in example 2 (p. 1.2) and plot, d and θ as a function of x on the same graph. Use different symbols for each dependent variable. Connect with lines. Label the axes and title the graph. Note that example 2 does not assign actual numerical values, we ll have to do that here. Assume that the measurements are evenly spaced in x, over a distance of 1km. Use the matlab linspace command to make this vector. Then use functions of x for the other parameters. Make the elevation to be a linear function of x, so that = (x-x 0 ), where x 0 is the initial location and x is measured in meters. Make vegetation density to be a sinusoidal function of x with a wave length of 10m, a mean value of 0.4, and an amplitude of 0.2, so that d = sin (2π/10m). Finally, make moisture content a stochastic variable with mean value of 0.2 and a random component with a maximum range of 0.1, θ = ε. The random variable is uniformly distributed between -1 and +1 and spatially uncorrelated. Use the matlab rand command. Potentially useful commands: plot, xlim, ylim, hold on, text, xlabel, ylabel, title, legend. 1.4 Variable spacing Using the output from the following line, and if necessary the commands help linspace and help logspace, write a short description (in proper English) of Matlab commands linspace and logspace. x1=0:0.1:1, x2=linspace(0,1,11), x3=logspace(0,1,11) 1.5. Plotting with variable spacing. You will often find occasion to examine the output of computer codes that you or someone else develops. In some cases the data will consist of values of one or more variables as a function of time, t, or space, x. With time, and with one-dimensional spatial models, the results will be presented as graphs of one or more dependent variables (heads, concentrations, temperatures, etc) vs. an independent variable (usually time or distance). The data will often be evenly spaced as a function of the independent variable, but that will not always be the case. Data is usually in the form of a series of data pairs (triplets, etc), consisting of a dependent variable value and its location (say, t or x)

6 This problem allows you to learn how to plot these types of graphs using Matlab. The structure is similar in other math codes and in standard plotting packages. Consider two functions of space, x. h = cos( x 2 k = x sin( x); Plot these two functions in the domain 0 x 3;, using 31 points in x created with the linspace command. Represent each function by a different symbol. Do not connect the points. Provide a concise listing of the commands that you use to create the data file and plot it. Label the x and y axes appropriately. Include a plot title and legend. a. Use evenly spaced points in the interval (0,3) with x = 0.1 increments. b. Place points spaced more closely at the larger x, where there is more action, using locations given by x = i, with 0 i 9 and i = Compare to the plot in part a. Note that both a and b use 31 points, but b uses them more efficiently by employing uneven spacing of the independent variable. Here you specified the region where more points will be used. The most sophisticated plotting routines go one step further, adaptively computing where more points are needed. The symbolic math code Mathematica does this automatically. 1.6 Plotting with Subplot Recall that sin(x) = - sin(-x) and cos(x) = + cos(-x). In words these two equations state "sin is an odd function" and "cosine is an even function". Create an m-file which makes a plot using the subplot command. Then use fplot command to plot the functions. See the Matlab help page for these commands, or a reference book or web page. The plot should have four subplots, one of sin(x), one of sin(-x), one of cos(x) and one of cos(-x). The range of each plot should be from -2π to 2π. Label all axes and title each plot. Visually inspect the plots. Write a short written definition (proper English) of even and odd functions

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

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

CSCI 239 Discrete Structures of Computer Science Lab 6 Vectors and Matrices

CSCI 239 Discrete Structures of Computer Science Lab 6 Vectors and Matrices CSCI 239 Discrete Structures of Computer Science Lab 6 Vectors and Matrices This lab consists of exercises on real-valued vectors and matrices. Most of the exercises will required pencil and paper. Put

More information

Companion. Jeffrey E. Jones

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

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

Project 2: Using linear systems for numerical solution of boundary value problems

Project 2: Using linear systems for numerical solution of boundary value problems LINEAR ALGEBRA, MATH 124 Instructor: Dr. T.I. Lakoba Project 2: Using linear systems for numerical solution of boundary value problems Goal Introduce one of the most important applications of Linear Algebra

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

GEOMETRY AND VECTORS

GEOMETRY AND VECTORS GEOMETRY AND VECTORS Distinguishing Between Points in Space One Approach Names: ( Fred, Steve, Alice...) Problem: distance & direction must be defined point-by-point More elegant take advantage of geometry

More information

1 Matrices and matrix algebra

1 Matrices and matrix algebra 1 Matrices and matrix algebra 1.1 Examples of matrices A matrix is a rectangular array of numbers and/or variables. For instance 4 2 0 3 1 A = 5 1.2 0.7 x 3 π 3 4 6 27 is a matrix with 3 rows and 5 columns

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

RT3D Rate-Limited Sorption Reaction

RT3D Rate-Limited Sorption Reaction GMS TUTORIALS RT3D Rate-Limited Sorption Reaction This tutorial illustrates the steps involved in using GMS and RT3D to model sorption reactions under mass-transfer limited conditions. The flow model used

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

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

Physics with Matlab and Mathematica Exercise #1 28 Aug 2012

Physics with Matlab and Mathematica Exercise #1 28 Aug 2012 Physics with Matlab and Mathematica Exercise #1 28 Aug 2012 You can work this exercise in either matlab or mathematica. Your choice. A simple harmonic oscillator is constructed from a mass m and a spring

More information

SECTION 2: VECTORS AND MATRICES. ENGR 112 Introduction to Engineering Computing

SECTION 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 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

GRAPHIC WEEK 7 DR. USMAN ULLAH SHEIKH DR. MUSA MOHD MOKJI DR. MICHAEL TAN LOONG PENG DR. AMIRJAN NAWABJAN DR. MOHD ADIB SARIJARI

GRAPHIC WEEK 7 DR. USMAN ULLAH SHEIKH DR. MUSA MOHD MOKJI DR. MICHAEL TAN LOONG PENG DR. AMIRJAN NAWABJAN DR. MOHD ADIB SARIJARI GRAPHIC SKEE1022 SCIENTIFIC PROGRAMMING WEEK 7 DR. USMAN ULLAH SHEIKH DR. MUSA MOHD MOKJI DR. MICHAEL TAN LOONG PENG DR. AMIRJAN NAWABJAN DR. MOHD ADIB SARIJARI 1 OBJECTIVE 2-dimensional line plot function

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

Vectors. A vector is usually denoted in bold, like vector a, or sometimes it is denoted a, or many other deviations exist in various text books.

Vectors. A vector is usually denoted in bold, like vector a, or sometimes it is denoted a, or many other deviations exist in various text books. Vectors A Vector has Two properties Magnitude and Direction. That s a weirder concept than you think. A Vector does not necessarily start at a given point, but can float about, but still be the SAME vector.

More information

Lecture 5b: Starting Matlab

Lecture 5b: Starting Matlab Lecture 5b: Starting Matlab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University August 7, 2013 Outline 1 Resources 2 Starting Matlab 3 Homework

More information

MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra

MATH.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 information

32. SOLVING LINEAR EQUATIONS IN ONE VARIABLE

32. SOLVING LINEAR EQUATIONS IN ONE VARIABLE get the complete book: /getfulltextfullbook.htm 32. SOLVING LINEAR EQUATIONS IN ONE VARIABLE classifying families of sentences In mathematics, it is common to group together sentences of the same type

More information

Chapter 2: Numeric, Cell, and Structure Arrays

Chapter 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 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

Assignment 1b: due Tues Nov 3rd at 11:59pm

Assignment 1b: due Tues Nov 3rd at 11:59pm n Today s Lecture: n n Vectorized computation Introduction to graphics n Announcements:. n Assignment 1b: due Tues Nov 3rd at 11:59pm 1 Monte Carlo Approximation of π Throw N darts L L/2 Sq. area = N =

More information

Introduction to Vectors

Introduction to Vectors Introduction to Vectors Why Vectors? Say you wanted to tell your friend that you re running late and will be there in five minutes. That s precisely enough information for your friend to know when you

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

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES ENGINEERING MATH 1 Fall 2009 VECTOR SPACES A vector space, more specifically, a real vector space (as opposed to a complex one or some even stranger ones) is any set that is closed under an operation of

More information

LS.1 Review of Linear Algebra

LS.1 Review of Linear Algebra LS. LINEAR SYSTEMS LS.1 Review of Linear Algebra In these notes, we will investigate a way of handling a linear system of ODE s directly, instead of using elimination to reduce it to a single higher-order

More information

Linear Motion with Constant Acceleration

Linear Motion with Constant Acceleration Linear Motion 1 Linear Motion with Constant Acceleration Overview: First you will attempt to walk backward with a constant acceleration, monitoring your motion with the ultrasonic motion detector. Then

More information

Vectors. Vector Practice Problems: Odd-numbered problems from

Vectors. Vector Practice Problems: Odd-numbered problems from Vectors Vector Practice Problems: Odd-numbered problems from 3.1-3.21 After today, you should be able to: Understand vector notation Use basic trigonometry in order to find the x and y components of a

More information

tom.h.wilson Dept. Geology and Geography West Virginia University Tom Wilson, Department of Geology and Geography

tom.h.wilson Dept. Geology and Geography West Virginia University Tom Wilson, Department of Geology and Geography tom.h.wilson tom.wilson@mail.wvu.edu Dept. Geology and Geography West Virginia University Items on the to do list Finish reading Chapter 8 and look over problems 8.13 and 8.14. Problems 8.13 and 8.14 are

More information

L3: Review of linear algebra and MATLAB

L3: 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 information

Physics 2A Chapter 1 - Vectors Fall 2017

Physics 2A Chapter 1 - Vectors Fall 2017 These notes are eight pages. That includes some diagrams, but I realize reading them could get a bit tedious. So here is a quick summary: A vector quantity is one for which direction is relevant, like

More information

Math 307 Learning Goals. March 23, 2010

Math 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 information

Updated 2013 (Mathematica Version) M1.1. Lab M1: The Simple Pendulum

Updated 2013 (Mathematica Version) M1.1. Lab M1: The Simple Pendulum Updated 2013 (Mathematica Version) M1.1 Introduction. Lab M1: The Simple Pendulum The simple pendulum is a favorite introductory exercise because Galileo's experiments on pendulums in the early 1600s are

More information

Using Matlab for Laboratory Data Reduction

Using Matlab for Laboratory Data Reduction Data Collected Using Matlab for Laboratory Data Reduction Munson, Young, and Okiishi [1] provide laboratory data for the measurement of the viscosity of water with a capillary tube viscometer. The viscometer

More information

9.4 Polar Coordinates

9.4 Polar Coordinates 9.4 Polar Coordinates Polar coordinates uses distance and direction to specify a location in a plane. The origin in a polar system is a fixed point from which a ray, O, is drawn and we call the ray the

More information

AP Physics C Mechanics Summer Assignment

AP Physics C Mechanics Summer Assignment AP Physics C Mechanics Summer Assignment 2018 2019 School Year Welcome to AP Physics C, an exciting and intensive introductory college physics course for students majoring in the physical sciences or engineering.

More information

Assignment 6, Math 575A

Assignment 6, Math 575A Assignment 6, Math 575A Part I Matlab Section: MATLAB has special functions to deal with polynomials. Using these commands is usually recommended, since they make the code easier to write and understand

More information

Vectors Year 12 Term 1

Vectors Year 12 Term 1 Vectors Year 12 Term 1 1 Vectors - A Vector has Two properties Magnitude and Direction - A vector is usually denoted in bold, like vector a, or a, or many others. In 2D - a = xı + yȷ - a = x, y - where,

More information

Chapter 3 Engineering Solutions. 3.4 and 3.5 Problem Presentation

Chapter 3 Engineering Solutions. 3.4 and 3.5 Problem Presentation Chapter 3 Engineering Solutions 3.4 and 3.5 Problem Presentation Organize your work as follows (see book): Problem Statement Theory and Assumptions Solution Verification Tools: Pencil and Paper See Fig.

More information

Conformational Analysis of n-butane

Conformational Analysis of n-butane Conformational Analysis of n-butane In this exercise you will calculate the Molecular Mechanics (MM) single point energy of butane in various conformations with respect to internal rotation around the

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

11.4 Dot Product Contemporary Calculus 1

11.4 Dot Product Contemporary Calculus 1 11.4 Dot Product Contemporary Calculus 1 11.4 DOT PRODUCT In the previous sections we looked at the meaning of vectors in two and three dimensions, but the only operations we used were addition and subtraction

More information

a11 a A = : a 21 a 22

a11 a A = : a 21 a 22 Matrices The study of linear systems is facilitated by introducing matrices. Matrix theory provides a convenient language and notation to express many of the ideas concisely, and complicated formulas are

More information

ME scope Application Note 28

ME scope Application Note 28 App Note 8 www.vibetech.com 3/7/17 ME scope Application Note 8 Mathematics of a Mass-Spring-Damper System INTRODUCTION In this note, the capabilities of ME scope will be used to build a model of the mass-spring-damper

More information

Math 307: Problems for section 3.1

Math 307: Problems for section 3.1 Math 307: Problems for section 3.. Show that if P is an orthogonal projection matrix, then P x x for every x. Use this inequality to prove the Cauchy Schwarz inequality x y x y. If P is an orthogonal projection

More information

Escola Federal de Engenharia de Itajubá

Escola Federal de Engenharia de Itajubá Escola Federal de Engenharia de Itajubá Departamento de Engenharia Mecânica Pós-Graduação em Engenharia Mecânica MPF04 ANÁLISE DE SINAIS E AQUISIÇÃO DE DADOS SINAIS E SISTEMAS Trabalho 01 (MATLAB) Prof.

More information

Physics 170 Lecture 2. Phys 170 Lecture 2 1

Physics 170 Lecture 2. Phys 170 Lecture 2 1 Physics 170 Lecture 2 Phys 170 Lecture 2 1 Phys 170 Lecture 2 2 dministrivia Registration issues? Web page issues? On Connect? http://www.physics.ubc.ca/~mattison/courses/phys170 Mastering Engineering

More information

Solving Equations by Adding and Subtracting

Solving Equations by Adding and Subtracting SECTION 2.1 Solving Equations by Adding and Subtracting 2.1 OBJECTIVES 1. Determine whether a given number is a solution for an equation 2. Use the addition property to solve equations 3. Determine whether

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Objective: Students will gain familiarity with using Excel to record data, display data properly, use built-in formulae to do calculations, and plot and fit data with linear functions.

More information

A First Course on Kinetics and Reaction Engineering Example 1.4

A First Course on Kinetics and Reaction Engineering Example 1.4 Example 1.4 Problem Purpose This example illustrates the process of identifying reactions that are linear combinations of other reactions in a set and eliminating them until a mathematically independent

More information

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations Lab 2 Worksheet Problems Problem : Geometry and Linear Equations Linear algebra is, first and foremost, the study of systems of linear equations. You are going to encounter linear systems frequently in

More information

Bonus Section II: Solving Trigonometric Equations

Bonus Section II: Solving Trigonometric Equations Fry Texas A&M University Math 150 Spring 2017 Bonus Section II 260 Bonus Section II: Solving Trigonometric Equations (In your text this section is found hiding at the end of 9.6) For what values of x does

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

GMS 8.0 Tutorial MT3DMS Advanced Transport MT3DMS dispersion, sorption, and dual domain options

GMS 8.0 Tutorial MT3DMS Advanced Transport MT3DMS dispersion, sorption, and dual domain options v. 8.0 GMS 8.0 Tutorial MT3DMS dispersion, sorption, and dual domain options Objectives Learn about the dispersion, sorption, and dual domain options in MT3DMS Prerequisite Tutorials None Required Components

More information

Notes: Vectors and Scalars

Notes: Vectors and Scalars A particle moving along a straight line can move in only two directions and we can specify which directions with a plus or negative sign. For a particle moving in three dimensions; however, a plus sign

More information

LINEAR ALGEBRA - CHAPTER 1: VECTORS

LINEAR ALGEBRA - CHAPTER 1: VECTORS LINEAR ALGEBRA - CHAPTER 1: VECTORS A game to introduce Linear Algebra In measurement, there are many quantities whose description entirely rely on magnitude, i.e., length, area, volume, mass and temperature.

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

Distance in the Plane

Distance in the Plane Distance in the Plane The absolute value function is defined as { x if x 0; and x = x if x < 0. If the number a is positive or zero, then a = a. If a is negative, then a is the number you d get by erasing

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

Vectors (Trigonometry Explanation)

Vectors (Trigonometry Explanation) Vectors (Trigonometry Explanation) CK12 Editor Say Thanks to the Authors Click http://www.ck12.org/saythanks (No sign in required) To access a customizable version of this book, as well as other interactive

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Macroeconomics Vivaldo Mendes Dep. Economics Instituto Universitário de Lisboa September 2017 (Vivaldo Mendes ISCTE-IUL ) Macroeconomics September 2013 1 / 41 Summary 1 Introduction

More information

Geotechnical Engineering Laboratory (CE 4348) Laboratory Report #1. Soil Classification. Group #1. Group member #1 Group member #2 Group member #3

Geotechnical Engineering Laboratory (CE 4348) Laboratory Report #1. Soil Classification. Group #1. Group member #1 Group member #2 Group member #3 Geotechnical Engineering Laboratory (CE 4348) Laboratory Report #1 Soil Classification Group #1 Group member #1 Group member #2 Group member #3 February 4, 2013 I have neither given nor received unauthorized

More information

Mathematics for Health and Physical Sciences

Mathematics for Health and Physical Sciences 1 Mathematics for Health and Physical Sciences Collection edited by: Wendy Lightheart Content authors: Wendy Lightheart, OpenStax, Wade Ellis, Denny Burzynski, Jan Clayton, and John Redden Online:

More information

Solutions to Selected Questions from Denis Sevee s Vector Geometry. (Updated )

Solutions to Selected Questions from Denis Sevee s Vector Geometry. (Updated ) Solutions to Selected Questions from Denis Sevee s Vector Geometry. (Updated 24--27) Denis Sevee s Vector Geometry notes appear as Chapter 5 in the current custom textbook used at John Abbott College for

More information

Math 515 Fall, 2008 Homework 2, due Friday, September 26.

Math 515 Fall, 2008 Homework 2, due Friday, September 26. Math 515 Fall, 2008 Homework 2, due Friday, September 26 In this assignment you will write efficient MATLAB codes to solve least squares problems involving block structured matrices known as Kronecker

More information

MAT 275 Laboratory 7 Laplace Transform and the Symbolic Math Toolbox

MAT 275 Laboratory 7 Laplace Transform and the Symbolic Math Toolbox Laplace Transform and the Symbolic Math Toolbox 1 MAT 275 Laboratory 7 Laplace Transform and the Symbolic Math Toolbox In this laboratory session we will learn how to 1. Use the Symbolic Math Toolbox 2.

More information

University of British Columbia Math 307, Final

University of British Columbia Math 307, Final 1 University of British Columbia Math 37, Final April 29, 214 12.-2.3pm Name: Student Number: Signature: Instructor: Instructions: 1. No notes, books or calculators are allowed. A MATLAB/Octave formula

More information

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

The roots are found with the following two statements. We have denoted the polynomial as p1, and the roots as roots_ p1. 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

More information

Matrix Algebra: Vectors

Matrix Algebra: Vectors A Matrix Algebra: Vectors A Appendix A: MATRIX ALGEBRA: VECTORS A 2 A MOTIVATION Matrix notation was invented primarily to express linear algebra relations in compact form Compactness enhances visualization

More information

A GUI FOR EVOLVE ZAMS

A GUI FOR EVOLVE ZAMS A GUI FOR EVOLVE ZAMS D. R. Schlegel Computer Science Department Here the early work on a new user interface for the Evolve ZAMS stellar evolution code is presented. The initial goal of this project is

More information

EE -213 BASIC CIRCUIT ANALYSIS LAB MANUAL

EE -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 information

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions Math 308 Midterm Answers and Comments July 18, 2011 Part A. Short answer questions (1) Compute the determinant of the matrix a 3 3 1 1 2. 1 a 3 The determinant is 2a 2 12. Comments: Everyone seemed to

More information

1 Introduction & Objective

1 Introduction & Objective Signal Processing First Lab 13: Numerical Evaluation of Fourier Series 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

More information

FORCE TABLE INTRODUCTION

FORCE TABLE INTRODUCTION FORCE TABLE INTRODUCTION All measurable quantities can be classified as either a scalar 1 or a vector 2. A scalar has only magnitude while a vector has both magnitude and direction. Examples of scalar

More information

Chapter 1E - Complex Numbers

Chapter 1E - Complex Numbers Fry Texas A&M University Math 150 Spring 2015 Unit 4 20 Chapter 1E - Complex Numbers 16 exists So far the largest (most inclusive) number set we have discussed and the one we have the most experience with

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

Vectors. In kinematics, the simplest concept is position, so let s begin with a position vector shown below:

Vectors. In kinematics, the simplest concept is position, so let s begin with a position vector shown below: Vectors Extending the concepts of kinematics into two and three dimensions, the idea of a vector becomes very useful. By definition, a vector is a quantity with both a magnitude and a spatial direction.

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

Algebraic. techniques1

Algebraic. techniques1 techniques Algebraic An electrician, a bank worker, a plumber and so on all have tools of their trade. Without these tools, and a good working knowledge of how to use them, it would be impossible for them

More information

Prealgebra. Edition 5

Prealgebra. Edition 5 Prealgebra Edition 5 Prealgebra, Edition 5 2009, 2007, 2005, 2004, 2003 Michelle A. Wyatt (M A Wyatt) 2009, Edition 5 Michelle A. Wyatt, author Special thanks to Garry Knight for many suggestions for the

More information

Worksheet 1.1: Introduction to Vectors

Worksheet 1.1: Introduction to Vectors Boise State Math 275 (Ultman) Worksheet 1.1: Introduction to Vectors From the Toolbox (what you need from previous classes) Know how the Cartesian coordinates a point in the plane (R 2 ) determine its

More information

2 Introduction to Variables

2 Introduction to Variables www.ck12.org CHAPTER 2 Introduction to Variables Chapter Outline 2.1 VARIABLE EXPRESSIONS 2.2 PATTERNS AND EXPRESSIONS 2.3 COMBINING LIKE TERMS 2.4 THE DISTRIBUTIVE PROPERTY 2.5 ADDITION AND SUBTRACTION

More information

Course Notes Math 275 Boise State University. Shari Ultman

Course Notes Math 275 Boise State University. Shari Ultman Course Notes Math 275 Boise State University Shari Ultman Fall 2017 Contents 1 Vectors 1 1.1 Introduction to 3-Space & Vectors.............. 3 1.2 Working With Vectors.................... 7 1.3 Introduction

More information

The Plane of Complex Numbers

The Plane of Complex Numbers The Plane of Complex Numbers In this chapter we ll introduce the complex numbers as a plane of numbers. Each complex number will be identified by a number on a real axis and a number on an imaginary axis.

More information

Vectors a vector is a quantity that has both a magnitude (size) and a direction

Vectors a vector is a quantity that has both a magnitude (size) and a direction Vectors In physics, a vector is a quantity that has both a magnitude (size) and a direction. Familiar examples of vectors include velocity, force, and electric field. For any applications beyond one dimension,

More information

Exam 1 Review SOLUTIONS

Exam 1 Review SOLUTIONS 1. True or False (and give a short reason): Exam 1 Review SOLUTIONS (a) If the parametric curve x = f(t), y = g(t) satisfies g (1) = 0, then it has a horizontal tangent line when t = 1. FALSE: To make

More information

STUDY GUIDE Math 20. To accompany Intermediate Algebra for College Students By Robert Blitzer, Third Edition

STUDY GUIDE Math 20. To accompany Intermediate Algebra for College Students By Robert Blitzer, Third Edition STUDY GUIDE Math 0 To the students: To accompany Intermediate Algebra for College Students By Robert Blitzer, Third Edition When you study Algebra, the material is presented to you in a logical sequence.

More information

New concepts: scalars, vectors, unit vectors, vector components, vector equations, scalar product. reading assignment read chap 3

New concepts: scalars, vectors, unit vectors, vector components, vector equations, scalar product. reading assignment read chap 3 New concepts: scalars, vectors, unit vectors, vector components, vector equations, scalar product reading assignment read chap 3 Most physical quantities are described by a single number or variable examples:

More information

Vectors. For physics and calculus students. Prepared by Larry Friesen and Anne Gillis

Vectors. For physics and calculus students. Prepared by Larry Friesen and Anne Gillis Vectors For physics and calculus students Prepared by Larry Friesen and Anne Gillis Butler Community College http://www.butlercc.edu Vectors This project is a direct result of math/physics instructional

More information

Vectors and Vector Arithmetic

Vectors and Vector Arithmetic Vectors and Vector Arithmetic Introduction and Goals: The purpose of this lab is to become familiar with the syntax of Maple commands for manipulating and graphing vectors. It will introduce you to basic

More information

Figure 1. Distance depends upon time.

Figure 1. Distance depends upon time. Section 3.1 Linear Models 219 3.1 Linear Models Sebastian waves good-bye to his brother, who is talking to a group of his friends approximately feet away. Sebastian then begins to walk away from his brother

More information

ENGR Spring Exam 2

ENGR Spring Exam 2 ENGR 1300 Spring 013 Exam INSTRUCTIONS: Duration: 60 minutes Keep your eyes on your own work! Keep your work covered at all times! 1. Each student is responsible for following directions. Read carefully..

More information

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34 Linear Algebra /34 Vectors A vector is a magnitude and a direction Magnitude = v Direction Also known as norm, length Represented by unit vectors (vectors with a length of 1 that point along distinct axes)

More information

Introduction to MatLab

Introduction to MatLab Introduction to MatLab 1 Introduction to MatLab Graduiertenkolleg Kognitive Neurobiologie Friday, 05 November 2004 Thuseday, 09 Novemer 2004 Kurt Bräuer Institut für Theoretische Physik, Universität Tübingen

More information

2.1 Definition. Let n be a positive integer. An n-dimensional vector is an ordered list of n real numbers.

2.1 Definition. Let n be a positive integer. An n-dimensional vector is an ordered list of n real numbers. 2 VECTORS, POINTS, and LINEAR ALGEBRA. At first glance, vectors seem to be very simple. It is easy enough to draw vector arrows, and the operations (vector addition, dot product, etc.) are also easy to

More information

MATH REFRESHER ANSWER SHEET (Note: Only this answer sheet and the following graph page will be evaluated)

MATH REFRESHER ANSWER SHEET (Note: Only this answer sheet and the following graph page will be evaluated) NAME: SCORE: /50 MATH REFRESHER ANSWER SHEET (Note: Only this answer sheet and the following graph page will be evaluated) 1. 23. 2. 24. 3. 25. 4. 26. 5. 27. 6. 28. 7. 29. 8. 30. 9. 31. 10. 32. 11. 33.

More information

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