We are tracking the position of an object as it is launched with an initial speed of 40m/s at an angle of 45 o. The system we are using to track the object.

Slides:



Advertisements
Similar presentations
Data Analysis using SPSS By Dr. Shaik Shaffi Ahamed Ph. D
Advertisements

MATLAB – A Computational Methods By Rohit Khokher Department of Computer Science, Sharda University, Greater Noida, India MATLAB – A Computational Methods.
© Paradigm Publishing, Inc Excel 2013 Level 1 Unit 1Preparing and Formatting a Worksheet Chapter 1Preparing an Excel Workbook.
1 CA202 Spreadsheet Application Combining Data from Multiple Sources Lecture # 6.
Analyzing Bivariate Data With Fathom * CFU Using technology with a set of contextual linear data to examine the line of best fit; determine and.
Lecture 7 Debugging Code & Data Import/Export © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
CITS2401 Computer Analysis & Visualisation
ES 100: Introduction to Engineering Use of the Computer 1.Log in using your Novell password. If you do not know your password, immediately (now!) see Al.
Regression in EXCEL r2 SSE b0 b1 SST.
Introduction to SPSS Short Courses Last created (Feb, 2008) Kentaka Aruga.
Matlab intro The Environment
Digital Image Processing Lecture3: Introduction to MATLAB.
Introduction  Today we are looking at how to interpret experimental data  Normally, data is acquired with random errors  How do we take the data and.
MATLAB File Management. MATLAB User File Management Matlab provides a group of commands to manage user files. For more information, type help iofun. pwd.
CTS130 Spreadsheet Lesson 5 Working with Simple Formulas.
Plotting II: By the end of this class you should be able to: Create a properly formatted engineering graph Create graphs of a function Place multiple plots.
Introduction to MATLAB for Engineers, Third Edition Chapter 6 Model Building and Regression PowerPoint to accompany Copyright © The McGraw-Hill Companies,
Lesson No:9 MS-Word Tools, Mail Merge and working with Tables CHBT-01 Basic Micro process & Computer Operation.
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
1 Lab of COMP 406 Teaching Assistant: Pei-Yuan Zhou Contact: Lab 1: 12 Sep., 2014 Introduction of Matlab (I)
SPREADSHEET BASICS SPREADSHEET BASICS What are the benefits of using a spreadsheet to solve a problem?
Matlab Workshop 1/10/07 Lesson 1: Matlab as a graphing calculator.
Recap Summary of Chapter 6 Interpolation Linear Interpolation.
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Intro to Matlab 1.Using scalar variables 2.Vectors, matrices, and arithmetic 3.Plotting 4.Solving Systems of Equations Can be found at:
Introduction to Matlab Module #2 Page 1 Introduction to Matlab Module #2 – Arrays Topics 1.Numeric arrays (creation, addressing, sizes) 2.Element-by-Element.
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
CMPS 1371 Introduction to Computing for Engineers FILE Input / Output.
File I/O High-Level Functions 1. Definition 2. Is a High-Level function appropriate? 3. xlsread() 4. dlmread() 1.
Introduction to SPSS. Object of the class About the windows in SPSS The basics of managing data files The basic analysis in SPSS.
Lecture 10 2D plotting & curve fitting Subplots Other 2-D Plots Other 2-D Plots Curve fitting © 2007 Daniel Valentine. All rights reserved. Published by.
FIX Eye FIX Eye Getting started: The guide EPAM Systems B2BITS.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 1 – Matlab Overview EGR1302. Desktop Command window Current Directory window Command History window Tabs to toggle between Current Directory &
1 DKT 211 Basic Communication Engineering LAB # 1A : (Lecture 1) Introduction to Matlab  Basic Features  Scientific features  Array Operations  Script.
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
Lecture 1: Matlab Universe
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Introduction to R Introductions What is R? RStudio Layout Summary Statistics Your First R Graph 17 September 2014 Sherubtse Training.
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
Polynomials, Curve Fitting and Interpolation. In this chapter will study Polynomials – functions of a special form that arise often in science and engineering.
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
1 Lecture 5 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Recap Functions with No input OR No output Determining The Number of Input and Output Arguments Local Variables Global Variables Creating ToolBox of Functions.
Matlab for Engineers Matlab Environment Chapter 2.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
STROUD Worked examples and exercises are in the text 1 STROUD Worked examples and exercises are in the text Programme F4: Graphs PROGRAMME F4 GRAPHS.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
1 Lecture 8 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
1 Berger Jean-Baptiste
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
1-2 What is the Matlab environment? How can you create vectors ? What does the colon : operator do? How does the use of the built-in linspace function.
IENG-385 Statistical Methods for Engineers SPSS (Statistical package for social science) LAB # 1 (An Introduction to SPSS)
Plotting in Excel Ken youssefi Engineering 10.
By Dr. Madhukar H. Dalvi Nagindas Khandwala college
Appendix B MathScript Basics
DEPARTMENT OF COMPUTER SCIENCE
Advanced Data Import & Export Jeff Henrikson
Lecture 10 2D plotting & curve fitting
MATH 493 Introduction to MATLAB
Plotting Data with MATLAB
Digital Image Processing
funCTIONs and Data Import/Export
Basics of R, Ch Functions Help Managing your Objects
Importing Excel Data & Exporting Data to Excel
Chapter 2 MATLAB Environment
Presentation transcript:

We are tracking the position of an object as it is launched with an initial speed of 40m/s at an angle of 45 o. The system we are using to track the object collects measurements of the object’s horizontal and vertical position every 0.1 seconds. We need to develop a mathematical expression to allow us to predict the path of future objects launched with the same speed and angle. Our Situation…

1.Go to the meta-course site on Blackboard 2.Go to the Lecture Folder and locate the information for Lecture 3 3.Save the Excel file Projectile_Data.xlsx in your Current Folder in MATLAB Access the data

We can use the xlsread command to bring our data into Excel: >> ArrayName = xlsread('filename','CellsToBeRead'); What would the commands be for us to read in each column from the Projectile_Data.xlsx file and store them into separate vectors? Importing Data from Excel

Select Import Data

Importing Data from Excel Variable Names default to Column Headers if present and valid otherwise you get generic names. Edit to what you want. Then click on the big Green Check Mark (Import Selection)

Using the Basic Fitting Tool In your figure window, select Tools\Basic Fitting Different types of curves you can try to fit to your data Select what data to use Will show the equation of the curve on the graph Plots the residual value for each data point in your graph Shows the norm of the residuals on the graph of the residuals

Expand Tool for Additional Features

Projectile Data >> plot(time,height,’k*’) Use the Basic Fitting Tool What type of curve seems to fit best for the height of the projectile? Does this make sense?

Projectile Data >> plot(time,distance,’k*’) What type of curve seems to fit best for the height of the projectile? Does this make sense?

Some Recent Cases of Trying to Use Data for Prediction August 21, 2013 Rockets with Chemical Weapons were fired into Damascus, Syria. Satellite data was analyzed to try to identify the point of origin of those rockets March 8, 2014 Malaysian Airlines Flight 370 disappears on a flight from Kuala Lumpur to Beijing Satellite data and on-line flight tracking data has been analyzed extensively to try to determine the location of the plane

Alternative to using the Basic Fitting Tool polyfit(x, y, N) will fit an Nth order polynomials to the set of data points (x,y). The output of polyfit is a vector of the numerical coefficients of the Nth order polynomial in descending order. polyval(polynomial, xvalues) will plug the xvalues into a given polynomial to compute the corresponding yvalues. The polynomial argument is simply a vector of the numerical coefficients of the polynomial in descending order.

Projectile Data >> Coeff_2nd = polyfit(time,height,2) >> yfit2 = polyval(Coeff_2nd,time); >> residuals = height – yfit2; >> residual_norm = sqrt(sum(residuals.^2))

>> clear % Clean out Workspace >> x = linspace(-1,2,10) % Create some data >> xlswrite('myfile',x) >> xlswrite('myfile',x,'A3:J3') >> xlswrite('myfile',x,'A5:Z5') % Too many cells, what happens? >> xlswrite('myfile',x,'A7:C7') % Not enough cells, what happens? >> xlswrite('myfile',x,'A10:A19') % Can we write a row to a column? Exporting Data to Excel

>> x' % Transpose x: Turns Row into Column or Column into Row ans = >> xlswrite('myfile',x','A10:A19') % Now it works ! Exporting Data to Excel

Double click on the variable, x, in the Workspace to open the Variable Editor Window. Can copy/paste into Excel. Variable Editor Window

Why bother using xlsread and xlswrite if we can use the import tool or copy/paste? Comment If you are regularly gathering data in an excel file and have some MATLAB program to analyze and present the data, using the xlsread command allows you to pull the data in automatically with your program rather than having to manually import the data every time you have a new file to work with.