Scientific Computing with MATLAB 2. Graphics for Research & Publication

Size: px
Start display at page:

Download "Scientific Computing with MATLAB 2. Graphics for Research & Publication"

Transcription

1 Scientific Computing with MATLAB 2. Graphics for Research & Publication Dra. K.-Y. Daisy Fan Department of Computer Science Cornell University Ithaca, NY, USA UNAM IIM 2012

2 Monte Carlo Approximation of Throw N darts L L/2 Sq. area = N = L L Circle area = N in = L 2 /4 = 4 N in / N 3

3 Monte Carlo with N darts on L-by-L board N= ; L= ; hits= 0; for k = 1:N % Throw kth dart x = rand(1)*l L/2; y = rand(1)*l L/2; % Count it if it is in the circle if sqrt(x^2+y^2) <= L/2 hits = hits + 1; end end mypi = 4*hits/N; 4

4 2-d array: matrix r c An array is a named collection of like data organized into rows and columns A 2-d array is a table, called a matrix Two indices identify the position of a value in a matrix, e.g., mat(r,c) refers to component in row r, column c of matrix mat Array index starts at 1 Rectangular: all rows have the same #of columns 5

5 Creating a matrix Built-in functions: ones, zeros, rand E.g., g, zeros(2,3) (,)gives a 2-by-3 matrix of 0s Build a matrix using square brackets, [ ], but the dimension must match up: [x y] puts y to the right of x [x; y] puts y below x [4 0 3; 5 1 9] creates the matrix [4 0 3; ones(1,3)] gives [4 0 3; ones(3,1)] doesn t work

6 What will A be? A= [0 0] A= [A ones(2,1)] A= [ ; A A] 7

7 % Given an nr-by-nc matrix M. % What is A? for r= 1: nr for c= 1: nc A(c,r)= M(r,c); end end 9

8 X-Y Plot The basic command is plot(a,b) which draws a line connecting the points (a(1),b(1)),(1) (a(2),b(2)),(2), (a(n),b(n)), ( ) )) where n is the length of vectors a and b. Can add format specifications. E.g., plot(a,b, *r ) draws red asterisks (*) at the data points instead of draws red asterisks (*) at the data points instead of using a line 11

9 Color Options White Black Red Blue Green Yellow Magenta Cyan w k r b g y m c 12

10 Making an x-y plot a= [ ]; % x-coords b= [ ]; % y-coords plot(a, b, -* ) x-values (a vector) y-values (a vector) 6 5 Line/marker format

11 Making a figure with plot figure % start a new graphics window hold on % hold subsequent plot commands in current axes plot(a,b) plot(c,d) hold off % subsequent plot command refreshes axes-- % erase previous items close % close graphics window 14

12 Trajectory of a projectile golf ball Without air resistance (drag), the trajectory of a golf ball in flight is a parabola. What is the effect of drag? Relevant equations for simulating the golf ball in flight: 15

13 Trajectory of a projectile golf ball Without air resistance (drag), the trajectory of a golf ball in flight is a parabola. What is the effect of drag? Relevant equations for simulating the golf ball in flight: 16

14 Trajectory of a projectile golf ball Without air resistance (drag), the trajectory of a golf ball in flight is a parabola. What is the effect of drag? Relevant equations for simulating the golf ball in flight: 17

15 Simulate a golf ball in flight Simulation begins at t = 0 and position (0,0) Simulation ends when the ball lands (y 0) or when maximum simulation time is reached Plot the trajectory See the given file golfball.m for the skeleton program, including given constant and parameters 18

16 Simulate a golf ball in flight Simulation begins at t = 0 and position (0,0) Simulation ends when the ball lands (y 0) or when maximum simulation time is reached Plot the trajectory See the given file golfball.m for the skeleton program, including given constant and parameters 19

17 Simulate flight for different friction coefficient values Modify golfball to show the trajectories in one plot for different values of the friction coefficient: k = 0,.02,,.08 21

18 Some format commands to use with plot close all % close all graphics windows axis equal % same scaling for x, y axes axis off % hide axes axis on % show axes xlabel( text for labeling x-axis ) ylable( text for labeling y-axis ) title( text for plot title at top center ) hold on % hold subsequent plot commands in current axes hold off % subsequent plot command refreshes axes-- % erase previous items 22

19 Draw a single line segment a= 0; % x-coord of pt 1 b= 1; % y-coord of pt 1 c= 5; % x-coord of pt 2 d= 3; % y-coord of pt 2 plot([a c], [b d], -* ) x-values (a vector) y-values (a vector) Line/marker format 23

20 Making an x-y plot with multiple graphs (lines) My graphs graph 1 name graph 2 name 4 a= [ ]; 3.5 b= [ ]; f= [ ]; g= [ ]; plot(a,b,'-*',f,g,'c') legend('graph 1 name', 'graph 2 name') xlabel('x values') ylabel('y values') title('my graphs', 'Fontsize',14) y values x values See also plotcomparison.m 25

21 Simulate flight for different friction coefficient values Modify golfball to show the trajectories in one plot for different values of the friction coefficient: k = 0,.02,,.08 Note: Can create or lengthen a vector, e.g., x = 3.1; % x is scalar 3.1 x(4) = 2; % x is vector [ ] 26

22 Demonstrate commonly used 2-d graphics 27

23 Files for tomorrow: df / UNAM_IIM2012/popMexicoByStates.xlsx A JPEG photo file, color or grayscale 39

Scientific Computing with MATLAB

Scientific Computing with MATLAB Scientific Computing with MATLAB Dra. K.-Y. Daisy Fan Department of Computer Science Cornell University Ithaca, NY, USA UNAM IIM 2012 2 Focus on computing using MATLAB Computer Science Computational Science

More information

Previous Lecture: Today s Lecture: Announcements: Nesting if-statements Logical operators short-circuit. Iteration using for

Previous Lecture: Today s Lecture: Announcements: Nesting if-statements Logical operators short-circuit. Iteration using for Previous Lecture: Nesting if-statements Logical operators short-circuit Today s Lecture: Iteration using for Announcements: Discussion this week is in the classrooms as listed in Student Center Register

More information

Additional Plot Types and Plot Formatting

Additional Plot Types and Plot Formatting Additional Plot Types and Plot Formatting The xy plot is the most commonly used plot type in MAT- LAB Engineers frequently plot either a measured or calculated dependent variable, say y, versus an independent

More information

CS 100: Programming Assignment P1

CS 100: Programming Assignment P1 CS 100: Programming Assignment P1 Due: Thursday, February 4. (Either in lecture or in Carpenter by 4pm.) You may work in pairs. Uphold academic integrity. Follow the course rules for the submission of

More information

Mechanical Engineering Department Second Year (2015)

Mechanical Engineering Department Second Year (2015) Lecture 7: Graphs Basic Plotting MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. This section describes a few of the most

More information

MATLAB Modul 2. Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition

MATLAB Modul 2. Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition MATLAB Modul 2 Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition Angela B. Shiflet and George W. Shiflet Wofford College 2014 by Princeton University Press Introduction

More information

QUICK INTRODUCTION TO MATLAB PART I

QUICK INTRODUCTION TO MATLAB PART I QUICK INTRODUCTION TO MATLAB PART I Department of Mathematics University of Colorado at Colorado Springs General Remarks This worksheet is designed for use with MATLAB version 6.5 or later. Once you have

More information

PART 1 PROGRAMMING WITH MATHLAB

PART 1 PROGRAMMING WITH MATHLAB PART 1 PROGRAMMING WITH MATHLAB Presenter: Dr. Zalilah Sharer 2018 School of Chemical and Energy Engineering Universiti Teknologi Malaysia 23 September 2018 Programming with MATHLAB MATLAB Environment

More information

Introduction to Matlab

Introduction to Matlab What is Matlab? Introduction to Matlab Matlab is software written by a company called The Mathworks (mathworks.com), and was first created in 1984 to be a nice front end to the numerical routines created

More information

Falling Balls. Names: Date: About this Laboratory

Falling Balls. Names: Date: About this Laboratory Falling Balls Names: Date: About this Laboratory In this laboratory,1 we will explore quadratic functions and how they relate to the motion of an object that is dropped from a specified height above ground

More information

OCR Maths M2. Topic Questions from Papers. Projectiles

OCR Maths M2. Topic Questions from Papers. Projectiles OCR Maths M2 Topic Questions from Papers Projectiles PhysicsAndMathsTutor.com 21 Aparticleisprojectedhorizontallywithaspeedof6ms 1 from a point 10 m above horizontal ground. The particle moves freely under

More information

Matlab Tutorial 1: Working with variables, arrays, and plotting

Matlab Tutorial 1: Working with variables, arrays, and plotting Matlab Tutorial 1: Working with variables, arrays, and plotting Setting up Matlab First of all, let's make sure we all have the same layout of the different windows in Matlab. Go to Home Layout Default.

More information

Unit 6 Quadratic Functions

Unit 6 Quadratic Functions Unit 6 Quadratic Functions 12.1 & 12.2 Introduction to Quadratic Functions What is A Quadratic Function? How do I tell if a Function is Quadratic? From a Graph The shape of a quadratic function is called

More information

EXERCISE SET 10.2 MATD 0390 DUE DATE: INSTRUCTOR

EXERCISE SET 10.2 MATD 0390 DUE DATE: INSTRUCTOR EXERCISE SET 10. STUDENT MATD 090 DUE DATE: INSTRUCTOR You have studied the method known as "completing the square" to solve quadratic equations. Another use for this method is in transforming the equation

More information

Introduction to Google SketchUp

Introduction to Google SketchUp Introduction to Google SketchUp When initially opening SketchUp, it will be useful to select the Google Earth Modelling Meters option from the initial menu. If this menu doesn t appear, the same option

More information

INC151 Electrical Engineering Software Practice. MATLAB Graphics. Dr.Wanchak Lenwari :Control System and Instrumentation Engineering, KMUTT 1

INC151 Electrical Engineering Software Practice. MATLAB Graphics. Dr.Wanchak Lenwari :Control System and Instrumentation Engineering, KMUTT 1 INC151 Electrical Engineering Software Practice MATLAB Graphics Dr.Wanchak Lenwari :Control System and Instrumentation Engineering, KMUTT 1 Graphical display is one of MATLAB s greatest strengths and most

More information

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment What is MATLAB? MATLAB PROGRAMMING Stands for MATrix LABoratory A software built around vectors and matrices A great tool for numerical computation of mathematical problems, such as Calculus Has powerful

More information

MATLAB Modul 3. Introduction

MATLAB Modul 3. Introduction MATLAB Modul 3 Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition Angela B. Shiflet and George W. Shiflet Wofford College 2014 by Princeton University Press Introduction

More information

(ii) Calculate the maximum height reached by the ball. (iii) Calculate the times at which the ball is at half its maximum height.

(ii) Calculate the maximum height reached by the ball. (iii) Calculate the times at which the ball is at half its maximum height. 1 Inthis question take g =10. A golf ball is hit from ground level over horizontal ground. The initial velocity of the ball is 40 m s 1 at an angle α to the horizontal, where sin α = 0.6 and cos α = 0.8.

More information

PROGRAMMING WITH MATLAB WEEK 6

PROGRAMMING WITH MATLAB WEEK 6 PROGRAMMING WITH MATLAB WEEK 6 Plot: Syntax: plot(x, y, r.- ) Color Marker Linestyle The line color, marker style and line style can be changed by adding a string argument. to select and delete lines

More information

UNIT 8: SOLVING AND GRAPHING QUADRATICS. 8-1 Factoring to Solve Quadratic Equations. Solve each equation:

UNIT 8: SOLVING AND GRAPHING QUADRATICS. 8-1 Factoring to Solve Quadratic Equations. Solve each equation: UNIT 8: SOLVING AND GRAPHING QUADRATICS 8-1 Factoring to Solve Quadratic Equations Zero Product Property For all numbers a & b Solve each equation: If: ab 0, 1. (x + 3)(x 5) = 0 Then one of these is true:

More information

Lab 4 Projectile Motion

Lab 4 Projectile Motion b Lab 4 Projectile Motion What You Need To Know: x = x v = v v o ox = v + v ox ox + at 1 t + at + a x FIGURE 1 Linear Motion Equations The Physics So far in lab you ve dealt with an object moving horizontally

More information

Quadratics Functions: Review

Quadratics Functions: Review Quadratics Functions: Review Name Per Review outline Quadratic function general form: Quadratic function tables and graphs (parabolas) Important places on the parabola graph [see chart below] vertex (minimum

More information

Introduction to MATLAB

Introduction to MATLAB CHEE MATLAB Tutorial Introduction to MATLAB Introduction In this tutorial, you will learn how to enter matrices and perform some matrix operations using MATLAB. MATLAB is an interactive program for numerical

More information

This module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in

This module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in This module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in subsequent modules to help to teach research related concepts

More information

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb Making Plots with Matlab (last updated 5/29/05 by GGB) Objectives: These tutorials are

More information

A General Introduction to Matlab

A General Introduction to Matlab Master Degree Course in ELECTRONICS ENGINEERING http://www.dii.unimore.it/~lbiagiotti/systemscontroltheory.html A General Introduction to Matlab e-mail: luigi.biagiotti@unimore.it http://www.dii.unimore.it/~lbiagiotti

More information

Section 6.2: Properties of Graphs of Quadratic Functions. Vertex:

Section 6.2: Properties of Graphs of Quadratic Functions. Vertex: Section 6.2: Properties of Graphs of Quadratic Functions determine the vertex of a quadratic in standard form sketch the graph determine the y intercept, x intercept(s), the equation of the axis of symmetry,

More information

6.4 Vertex Form of a Quadratic Function

6.4 Vertex Form of a Quadratic Function 6.4 Vertex Form of a Quadratic Function Recall from 6.1 and 6.2: Standard Form The standard form of a quadratic is: f(x) = ax 2 + bx + c or y = ax 2 + bx + c where a, b, and c are real numbers and a 0.

More information

Warm-Up Exercises. Find the x-intercept and y-intercept 1. 3x 5y = 15 ANSWER 5; y = 2x + 7 ANSWER ; 7

Warm-Up Exercises. Find the x-intercept and y-intercept 1. 3x 5y = 15 ANSWER 5; y = 2x + 7 ANSWER ; 7 Warm-Up Exercises Find the x-intercept and y-intercept 1. 3x 5y = 15 ANSWER 5; 3 2. y = 2x + 7 7 2 ANSWER ; 7 Chapter 1.1 Graph Quadratic Functions in Standard Form A quadratic function is a function that

More information

Student Exploration: Quadratics in Polynomial Form

Student Exploration: Quadratics in Polynomial Form Name: Date: Student Exploration: Quadratics in Polynomial Form Vocabulary: axis of symmetry, parabola, quadratic function, vertex of a parabola Prior Knowledge Questions (Do these BEFORE using the Gizmo.)

More information

7-5 Parametric Equations

7-5 Parametric Equations 3. Sketch the curve given by each pair of parametric equations over the given interval. Make a table of values for 6 t 6. t x y 6 19 28 5 16.5 17 4 14 8 3 11.5 1 2 9 4 1 6.5 7 0 4 8 1 1.5 7 2 1 4 3 3.5

More information

12 whereas if I terminate the expression with a semicolon, the printed output is suppressed.

12 whereas if I terminate the expression with a semicolon, the printed output is suppressed. Example 4 Printing and Plotting Matlab provides numerous print and plot options. This example illustrates the basics and provides enough detail that you can use it for typical classroom work and assignments.

More information

3x 2 + 7x + 2. A 8-6 Factor. Step 1. Step 3 Step 4. Step 2. Step 1 Step 2 Step 3 Step 4

3x 2 + 7x + 2. A 8-6 Factor. Step 1. Step 3 Step 4. Step 2. Step 1 Step 2 Step 3 Step 4 A 8-6 Factor. Step 1 3x 2 + 7x + 2 Step 2 Step 3 Step 4 3x 2 + 7x + 2 3x 2 + 7x + 2 Step 1 Step 2 Step 3 Step 4 Factor. 1. 3x 2 + 4x +1 = 2. 3x 2 +10x + 3 = 3. 3x 2 +13x + 4 = A 8-6 Name BDFM? Why? Factor.

More information

Section 9.3 Graphing Quadratic Functions

Section 9.3 Graphing Quadratic Functions Section 9.3 Graphing Quadratic Functions A Quadratic Function is an equation that can be written in the following Standard Form., where a 0. Every quadratic function has a U-shaped graph called a. If the

More information

Computational lab on complex numbers

Computational lab on complex numbers Computational lab on complex numbers SAK, physics 1140 March 15, 2010 1 Objective To learn how to use MATLAB as an advanced calculator and gain familiarity with complex numbers using MATLAB. 2 Introduction

More information

The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development

The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Chapter 7 Graphics Learning outcomes Label your plots Create different

More information

Introduction to Scientific Programming in MATLAB

Introduction to Scientific Programming in MATLAB Introduction to Scientific Programming in MATLAB Derrick Kearney HUBzero Platform for Scientific Collaboration Purdue University Original slides by Michael McLennan This work licensed under Creative Commons

More information

Computer Programming in MATLAB

Computer Programming in MATLAB Computer Programming in MATLAB Prof. Dr. İrfan KAYMAZ Engineering Faculty Department of Mechanical Engineering Arrays in MATLAB; Vectors and Matrices Graphing Vector Generation Before graphing plots in

More information

LAB 1 General MATLAB Information 1

LAB 1 General MATLAB Information 1 LAB 1 General MATLAB Information 1 General: To enter a matrix: > type the entries between square brackets, [...] > enter it by rows with elements separated by a space or comma > rows are terminated by

More information

1 Introduction to Matlab

1 Introduction to Matlab 1 Introduction to Matlab 1. What is Matlab? Matlab is a computer program designed to do mathematics. You might think of it as a super-calculator. That is, once Matlab has been started, you can enter computations,

More information

MATH (CRN 13695) Lab 1: Basics for Linear Algebra and Matlab

MATH (CRN 13695) Lab 1: Basics for Linear Algebra and Matlab MATH 495.3 (CRN 13695) Lab 1: Basics for Linear Algebra and Matlab Below is a screen similar to what you should see when you open Matlab. The command window is the large box to the right containing the

More information

1. Register an account on: using your Oxford address

1. Register an account on:   using your Oxford  address 1P10a MATLAB 1.1 Introduction MATLAB stands for Matrix Laboratories. It is a tool that provides a graphical interface for numerical and symbolic computation along with a number of data analysis, simulation

More information

Getting Started. Chapter 1. How to Get Matlab. 1.1 Before We Begin Matlab to Accompany Lay s Linear Algebra Text

Getting Started. Chapter 1. How to Get Matlab. 1.1 Before We Begin Matlab to Accompany Lay s Linear Algebra Text Chapter 1 Getting Started How to Get Matlab Matlab physically resides on each of the computers in the Olin Hall labs. See your instructor if you need an account on these machines. If you are going to go

More information

Lesson 3.1 Vertices and Intercepts. Important Features of Parabolas

Lesson 3.1 Vertices and Intercepts. Important Features of Parabolas Lesson 3.1 Vertices and Intercepts Name: _ Learning Objective: Students will be able to identify the vertex and intercepts of a parabola from its equation. CCSS.MATH.CONTENT.HSF.IF.C.7.A Graph linear and

More information

Chapter 2. MATLAB Fundamentals

Chapter 2. MATLAB Fundamentals Chapter 2. MATLAB Fundamentals Choi Hae Jin Chapter Objectives q Learning how real and complex numbers are assigned to variables. q Learning how vectors and matrices are assigned values using simple assignment,

More information

MATLAB Introduction to MATLAB Programming

MATLAB Introduction to MATLAB Programming MATLAB Introduction to MATLAB Programming MATLAB Scripts So far we have typed all the commands in the Command Window which were executed when we hit Enter. Although every MATLAB command can be executed

More information

It is than the graph of y= x if a > 1.

It is than the graph of y= x if a > 1. Chapter 8 Quadratic Functions and Equations Name: Instructor: 8.1 Quadratic Functions and Their Graphs Graphs of Quadratic Functions Basic Transformations of Graphs More About Graphing Quadratic Functions

More information

1. a. After inspecting the equation for the path of the winning throw, which way do you expect the parabola to open? Explain.

1. a. After inspecting the equation for the path of the winning throw, which way do you expect the parabola to open? Explain. Name Period Date More Quadratic Functions Shot Put Activity 3 Parabolas are good models for a variety of situations that you encounter in everyday life. Example include the path of a golf ball after it

More information

Practice Test (page 391) 1. For each line, count squares on the grid to determine the rise and the run. Use slope = rise

Practice Test (page 391) 1. For each line, count squares on the grid to determine the rise and the run. Use slope = rise Practice Test (page 91) 1. For each line, count squares on the grid to determine the rise and the. Use slope = rise 4 Slope of AB =, or 6 Slope of CD = 6 9, or Slope of EF = 6, or 4 Slope of GH = 6 4,

More information

MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras

MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras Module No. #01 Lecture No. #1.1 Introduction to MATLAB programming

More information

MATLAB Fundamentals. Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University

MATLAB Fundamentals. Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University MATLAB Fundamentals Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University Reference: 1. Applied Numerical Methods with MATLAB for Engineers, Chapter 2 &

More information

Section 4.4: Parabolas

Section 4.4: Parabolas Objective: Graph parabolas using the vertex, x-intercepts, and y-intercept. Just as the graph of a linear equation y mx b can be drawn, the graph of a quadratic equation y ax bx c can be drawn. The graph

More information

Quadratic Functions Dr. Laura J. Pyzdrowski

Quadratic Functions Dr. Laura J. Pyzdrowski 1 Names: (8 communication points) About this Laboratory A quadratic function in the variable x is a polynomial where the highest power of x is 2. We will explore the domains, ranges, and graphs of quadratic

More information

Logical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression.

Logical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression. What is the answer? >> Logical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression. The finite(x)is true for all finite numerical

More information

Three-Dimensional (Surface) Plots

Three-Dimensional (Surface) Plots Three-Dimensional (Surface) Plots Creating a Data Array 3-Dimensional plots (surface plots) are often useful for visualizing the behavior of functions and identifying important mathematical/physical features

More information

Lesson 8 Introduction to Quadratic Functions

Lesson 8 Introduction to Quadratic Functions Lesson 8 Introduction to Quadratic Functions We are leaving exponential and logarithmic functions behind and entering an entirely different world. As you work through this lesson, you will learn to identify

More information

Applied Parabolas: Catapult (one test grade)

Applied Parabolas: Catapult (one test grade) Name: I. Overview: PreCalculus Applied Parabola Project Applied Parabolas: Catapult (one test grade) You will use catapults to launch candy into the air. Using a stopwatch, you will time how long the projectile

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 4 Visualising Data Dr Richard Greenaway 4 Visualising Data 4.1 Simple Data Plotting You should now be familiar with the plot function which is

More information

Graphical Analysis of Kinematics

Graphical Analysis of Kinematics Physics Topics Graphical Analysis of Kinematics If necessary, review the following topics and relevant textbook sections from Serway / Jewett Physics for Scientists and Engineers, 9th Ed. Velocity and

More information

Laboratory One Distance and Time

Laboratory One Distance and Time Laboratory One Distance and Time Student Laboratory Description Distance and Time I. Background When an object is propelled upwards, its distance above the ground as a function of time is described by

More information

Solving Simple Quadratics 1.0 Topic: Solving Quadratics

Solving Simple Quadratics 1.0 Topic: Solving Quadratics Ns Solving Simple Quadratics 1.0 Topic: Solving Quadratics Date: Objectives: SWBAT (Solving Simple Quadratics and Application dealing with Quadratics) Main Ideas: Assignment: Square Root Property If x

More information

Review for Quarter 3 Cumulative Test

Review for Quarter 3 Cumulative Test Review for Quarter 3 Cumulative Test I. Solving quadratic equations (LT 4.2, 4.3, 4.4) Key Facts To factor a polynomial, first factor out any common factors, then use the box method to factor the quadratic.

More information

You can change the line style by adding some information in the plot command within single quotation marks.

You can change the line style by adding some information in the plot command within single quotation marks. Plotting Continued: You can change the line style by adding some information in the plot command within single quotation marks. y = x.^2; plot(x,y, '-xr') xlabel('x, meters') ylabel('y, meters squared')

More information

Step 2: Find the coordinates of the vertex (h, k) Step 5: State the zeros and interpret what they mean. Step 6: Make sure you answered all questions.

Step 2: Find the coordinates of the vertex (h, k) Step 5: State the zeros and interpret what they mean. Step 6: Make sure you answered all questions. Chapter 4 No Problem Word Problems! Name: Algebra 2 Period: 1 2 3 4 5 6 A. Solving from Standard Form 1. A ball is thrown so its height, h, in feet, is given by the equation h = 16t! + 10t where t is the

More information

Quadratic Functions, Part 1

Quadratic Functions, Part 1 Quadratic Functions, Part 1 A2.F.BF.A.1 Write a function that describes a relationship between two quantities. A2.F.BF.A.1a Determine an explicit expression, a recursive process, or steps for calculation

More information

Computational Modelling 102 (Scientific Programming) Tutorials

Computational Modelling 102 (Scientific Programming) Tutorials COMO 102 : Scientific Programming, Tutorials 2003 1 Computational Modelling 102 (Scientific Programming) Tutorials Dr J. D. Enlow Last modified August 18, 2003. Contents Tutorial 1 : Introduction 3 Tutorial

More information

+. n is the function parameter and the function returns the sum.

+. n is the function parameter and the function returns the sum. CS/INFO 1305 Programming Exercise 2 Due Wednesday, July 22, at 10pm Submit either Level 1 or Level 2. For Level 2, problem 2.3 is required; complete ONE of 2.1 and 2.2. 1 Level 1 1. During the previous

More information

Projectile Trajectory Scenarios

Projectile Trajectory Scenarios Projectile Trajectory Scenarios Student Worksheet Name Class Note: Sections of this document are numbered to correspond to the pages in the TI-Nspire.tns document ProjectileTrajectory.tns. 1.1 Trajectories

More information

Basic Graphs. Dmitry Adamskiy 16 November 2011

Basic Graphs. Dmitry Adamskiy 16 November 2011 Basic Graphs Dmitry Adamskiy adamskiy@cs.rhul.ac.uk 16 November 211 1 Plot Function plot(x,y): plots vector Y versus vector X X and Y must have the same size: X = [x1, x2 xn] and Y = [y1, y2,, yn] Broken

More information

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens.

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens. PC-MATLAB PRIMER This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens. >> 2*3 ans = 6 PCMATLAB uses several lines for the answer, but I ve edited this to save space.

More information

1. (10 pts) Order the following three images by how much memory they occupy:

1. (10 pts) Order the following three images by how much memory they occupy: CS 47 Prelim Tuesday, February 25, 2003 Problem : Raster images (5 pts). (0 pts) Order the following three images by how much memory they occupy: A. a 2048 by 2048 binary image B. a 024 by 024 grayscale

More information

PROJECTILE MOTION PURPOSE

PROJECTILE MOTION PURPOSE PURPOSE The purpose of this experiment is to study the motion of an object in two dimensions. The motion of the projectile is analyzed using Newton's laws of motion. During the motion of the projectile,

More information

Dealing with Data in Excel 2013/2016

Dealing with Data in Excel 2013/2016 Dealing with Data in Excel 2013/2016 Excel provides the ability to do computations and graphing of data. Here we provide the basics and some advanced capabilities available in Excel that are useful for

More information

50 Basic Examples for Matlab

50 Basic Examples for Matlab 50 Basic Examples for Matlab v. 2012.3 by HP Huang (typos corrected, 10/2/2012) Supplementary material for MAE384, 502, 578, 598 1 Ex. 1 Write your first Matlab program a = 3; b = 5; c = a+b 8 Part 1.

More information

QUADRATICS Graphing Quadratic Functions Common Core Standard

QUADRATICS Graphing Quadratic Functions Common Core Standard H Quadratics, Lesson 6, Graphing Quadratic Functions (r. 2018) QUADRATICS Graphing Quadratic Functions Common Core Standard Next Generation Standard F-IF.B.4 For a function that models a relationship between

More information

2D LINE PLOTS... 1 The plot() Command... 1 Labeling and Annotating Figures... 5 The subplot() Command... 7 The polarplot() Command...

2D LINE PLOTS... 1 The plot() Command... 1 Labeling and Annotating Figures... 5 The subplot() Command... 7 The polarplot() Command... Contents 2D LINE PLOTS... 1 The plot() Command... 1 Labeling and Annotating Figures... 5 The subplot() Command... 7 The polarplot() Command... 9 2D LINE PLOTS One of the benefits of programming in MATLAB

More information

x = 12 x = 12 1x = 16

x = 12 x = 12 1x = 16 2.2 - The Inverse of a Matrix We've seen how to add matrices, multiply them by scalars, subtract them, and multiply one matrix by another. The question naturally arises: Can we divide one matrix by another?

More information

Types of Functions Here are six common types of functions and examples of each. Linear Quadratic Absolute Value Square Root Exponential Reciprocal

Types of Functions Here are six common types of functions and examples of each. Linear Quadratic Absolute Value Square Root Exponential Reciprocal Topic 2.0 Review Concepts What are non linear equations? Student Notes Unit 2 Non linear Equations Types of Functions Here are six common types of functions and examples of each. Linear Quadratic Absolute

More information

Introduction to Matlab to Accompany Linear Algebra. Douglas Hundley Department of Mathematics and Statistics Whitman College

Introduction to Matlab to Accompany Linear Algebra. Douglas Hundley Department of Mathematics and Statistics Whitman College Introduction to Matlab to Accompany Linear Algebra Douglas Hundley Department of Mathematics and Statistics Whitman College August 27, 2018 2 Contents 1 Getting Started 5 1.1 Before We Begin........................................

More information

Sketching graphs of polynomials

Sketching graphs of polynomials Sketching graphs of polynomials We want to draw the graphs of polynomial functions y = f(x). The degree of a polynomial in one variable x is the highest power of x that remains after terms have been collected.

More information

Graphical Analysis of Kinematics

Graphical Analysis of Kinematics Physics Topics Graphical Analysis of Kinematics If necessary, review the following topics and relevant textbook sections from Serway / Jewett Physics for Scientists and Engineers, 9th Ed. Velocity and

More information

Worksheet: Transformations of Quadratic Functions

Worksheet: Transformations of Quadratic Functions Worksheet: Transformations of Quadratic Functions Multiple Choice Identif the choice that best completes the statement or answers the question.. Which correctl identifies the values of the parameters a,

More information

If you are not familiar with IMP you should download and read WhatIsImp and CoordGenManual before proceeding.

If you are not familiar with IMP you should download and read WhatIsImp and CoordGenManual before proceeding. IMP: PCAGen6- Principal Components Generation Utility PCAGen6 This software package is a Principal Components Analysis utility intended for use with landmark based morphometric data. The program loads

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 1 Chapter 2 MATLAB Fundamentals PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

More information

Lecture 5. If, as shown in figure, we form a right triangle With P1 and P2 as vertices, then length of the horizontal

Lecture 5. If, as shown in figure, we form a right triangle With P1 and P2 as vertices, then length of the horizontal Distance; Circles; Equations of the form Lecture 5 y = ax + bx + c In this lecture we shall derive a formula for the distance between two points in a coordinate plane, and we shall use that formula to

More information

Maths for Signals and Systems Linear Algebra in Engineering. Some problems by Gilbert Strang

Maths for Signals and Systems Linear Algebra in Engineering. Some problems by Gilbert Strang Maths for Signals and Systems Linear Algebra in Engineering Some problems by Gilbert Strang Problems. Consider u, v, w to be non-zero vectors in R 7. These vectors span a vector space. What are the possible

More information

Describe the Squirt Studio

Describe the Squirt Studio Name: Recitation: Describe the Squirt Studio This sheet includes both instruction sections (labeled with letters) and problem sections (labeled with numbers). Please work through the instructions and answer

More information

A Tutorial on Matlab Ch. 3 Programming in Matlab

A Tutorial on Matlab Ch. 3 Programming in Matlab Department of Electrical Engineering University of Arkansas A Tutorial on Matlab Ch. 3 Programming in Matlab Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 Plotting M-file Scripts Functions Control Flows Exercises

More information

TikZ & PGF(plots) Daniel Knittl-Frank. May This work is licensed under the Creative Commons Attribution-ShareAlike 3.

TikZ & PGF(plots) Daniel Knittl-Frank. May This work is licensed under the Creative Commons Attribution-ShareAlike 3. TikZ & PGF(plots) Daniel Knittl-Frank May 2015 This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Austria license (CC-BY-SA) 2D value plot Bitstamp USD 20,000 Weighted Price High

More information

Statement of integrity: I did not, and will not, violate the rules of academic integrity on this exam.

Statement of integrity: I did not, and will not, violate the rules of academic integrity on this exam. CS100M Fall 2007 Prelim 2 CIS121 Final Exam Oct 16 7:30 9:00pm Name: (Legibly print last name, first name, middle name) NetID: Statement of integrity: I did not, and will not, violate the rules of academic

More information

Graphics and plotting techniques

Graphics and plotting techniques Davies: Computer Vision, 5 th edition, online materials Matlab Tutorial 5 1 Graphics and plotting techniques 1. Introduction The purpose of this tutorial is to outline the basics of graphics and plotting

More information

Matlab notes Matlab is a matrix-based, high-performance language for technical computing It integrates computation, visualisation and programming usin

Matlab notes Matlab is a matrix-based, high-performance language for technical computing It integrates computation, visualisation and programming usin Matlab notes Matlab is a matrix-based, high-performance language for technical computing It integrates computation, visualisation and programming using familiar mathematical notation The name Matlab stands

More information

Section 7.2 Characteristics of Quadratic Functions

Section 7.2 Characteristics of Quadratic Functions Section 7. Characteristics of Quadratic Functions A QUADRATIC FUNCTION is a function of the form " # $ N# 1 & ;# & 0 Characteristics Include:! Three distinct terms each with its own coefficient:! An x

More information

Lesson 6 - Practice Problems

Lesson 6 - Practice Problems Lesson 6 - Practice Problems Section 6.1: Characteristics of Quadratic Functions 1. For each of the following quadratic functions: Identify the coefficients a, b and c. Determine if the parabola opens

More information

Making the Gradient. Create a Linear Gradient Swatch. Follow these instructions to complete the Making the Gradient assignment:

Making the Gradient. Create a Linear Gradient Swatch. Follow these instructions to complete the Making the Gradient assignment: Making the Gradient Follow these instructions to complete the Making the Gradient assignment: Create a Linear Gradient Swatch 1) Save the Making the Gradient file (found on Mrs. Burnett s website) to your

More information

fplot Syntax Description Examples Plot Symbolic Expression Plot symbolic expression or function fplot(f) fplot(f,[xmin xmax])

fplot Syntax Description Examples Plot Symbolic Expression Plot symbolic expression or function fplot(f) fplot(f,[xmin xmax]) fplot Plot symbolic expression or function Syntax fplot(f) fplot(f,[xmin xmax]) fplot(xt,yt) fplot(xt,yt,[tmin tmax]) fplot(,linespec) fplot(,name,value) fplot(ax, ) fp = fplot( ) Description fplot(f)

More information

Matlab Tutorial and Exercises for COMP61021

Matlab Tutorial and Exercises for COMP61021 Matlab Tutorial and Exercises for COMP61021 1 Introduction This is a brief Matlab tutorial for students who have not used Matlab in their programming. Matlab programming is essential in COMP61021 as a

More information

Finding the axis of symmetry, vertex, and roots of a parabola

Finding the axis of symmetry, vertex, and roots of a parabola Finding the axis of symmetry, vertex, and roots of a parabola 1) Find the Axis of Symmetry of y = x 2-4x + 3 (The AOS is the vertical line that splits the parabola in 2 equal parts) Axis of Symmetry Axis

More information

Contents 10. Graphs of Trigonometric Functions

Contents 10. Graphs of Trigonometric Functions Contents 10. Graphs of Trigonometric Functions 2 10.2 Sine and Cosine Curves: Horizontal and Vertical Displacement...... 2 Example 10.15............................... 2 10.3 Composite Sine and Cosine

More information