Curve Fitting the Calibration Data of a Thermistor Voltage Divider

Size: px
Start display at page:

Download "Curve Fitting the Calibration Data of a Thermistor Voltage Divider"

Transcription

1 Curve Fitting the Calibration Data of a Thermistor Voltage Divider Gerald Recktenwald Portland State University Department of Mechanical Engineering gerry@me.pdx.edu March 5, 213 EAS 199B: Engineering Problem Solving

2 Thermistor Calibration Measurements To make measurements with an Arduino, the thermistor is located in the upper leg of a voltage divider. 5V thermistor Analog input 1 kω For the calibration measurements, the thermistor is placed in an insulated thermos, along with a thermometer and water. Insulated Coffee mug Thermistor probe +5V or digital output analog input Voltage divider for Arduino input Reference Thermometer EAS 199B: Engineering Problem Solving page 1

3 Calibration Data Set Data storage Repeated readings of the voltage divider are averaged. The averaged values are displayed in the Arduino Serial Monitor. The displayed data is copied and pasted into columns of an Excel spreadsheet. The first row of the spreadsheet is the temperature for the data set. Columns under the first row are the averaged raw analog input values. After the measurements are complete, the data in the Excel worksheet is saved as a tabdelimited text file nc Temperature in first row Analog input values in other rows EAS 199B: Engineering Problem Solving page 2

4 Analysis of Calibration Data with Matlab The analysis of the calibration data involves these steps 1. Read the data into Matlab. 2. Plot histograms of the raw readings to determine the variability of the calibration readings. 3. Compute the mean of the raw readings 4. Curve fit the raw voltage divider readings as a function of temperature 5. Swap the roles of the data to curve fit the temperature as a function of voltage divider readings. The quality of the curve fits is assessed with plots of the residuals. EAS 199B: Engineering Problem Solving page 3

5 Read the Calibration Data into Matlab The built-in load function reads an array of plain text data into a matrix D = load( thermistor_data.txt ) D is a matrix. The first row of D is the temperature. T = D(1,:); The remaining rows are voltage divider readings V = D(2:end,:); Most of the work involves analyzing the data in the new matrix V nc Temperature in first row Analog input values in other rows EAS 199B: Engineering Problem Solving page 4

6 Read the Calibration Data into Matlab Compute the average of each of the columns in V Vave = mean(v); Vave is a row vector with the same number of elements as T. The length (number of elements) in both T and Vave is equal to the number of columns in the data set. EAS 199B: Engineering Problem Solving page 5

7 Plot the Calibration Data It is easy to plot the mean data. plot(t,vave, o ); xlabel( Temperature (C) ); ylabel( Analog reading ); But we are getting ahead of ourselves. We should first look at the quality of the data by making histograms of the readings for each calibration temperature. Analog reading Temperature (C) For convenience, the following page lists a Matlab function to load and plot the data. EAS 199B: Engineering Problem Solving page 6

8 Plot Calibration Data function plot_calibration_data(fname) % plot_calibration_data Plot raw calibration data for the thermistor % -- Supply a default file name if nargin<1, fname= thermistor_data.txt ; end % -- Load the data and compute summary statistics for each column D = load(fname); T = D(1,:); % Temperature values in first row V = D(2:end,:); % Voltage data in columns from second row until end Vave = mean(v); % Mean of data in each column % -- Plot the averaged reading versus the calibration temperature plot(t,vave, o ); xlabel( Temperature (C) ); ylabel( Analog reading (1-bit scale) ); EAS 199B: Engineering Problem Solving page 7

9 Histogram of the Calibration Data (1) It is easy to plot a histogram of the data in the first column. hist(v(:,1)) xlabel( Analog reading (1-bit scale) ) ylabel( Number of readings ) V(:,1) is the vector of data in the first column of V. The : is a wildcard meaning all of the row indices. There appears to be some spread in the data, but look at the range! Number of readings Analog reading (1 bit scale) The analog readings are integer values. The entire set of readings at this temperature fall between and The non-integer values occur because each of the readings in the data set is an average of 2 readings. EAS 199B: Engineering Problem Solving page 8

10 Histogram of the Calibration Data (2) There is no significant variability for the data in the first column. Let s check the other columns (other temperatures). Number of readings Analog reading (1 bit scale) The histogram of the second column is obtained with hist(v(:,2)) which produces the plot to the right. Again, the readings fall in a very narrow of analog input values. Number of readings Analog reading (1 bit scale) EAS 199B: Engineering Problem Solving page 9

11 Histogram of the Calibration Data (3) We can automate the creation of histograms with a loop over all columns in V. First, extract the number of columns for the data set with the built-in size command nc = size(v,2) This is nice: our data analysis automatically adjusts to the size number of columns and number of rows of the data set. No mouse clicks involved! With nc known, the following loop computes histograms for each of the columns in V nc = size(v,2) for j=1:nc figure % Open a new plot window hist(v(:,j)) % Histogram of data in column j xlabel( Analog reading (1-bit scale) ) ylabel( Number of readings ) end EAS 199B: Engineering Problem Solving page 1

12 Histogram of the Calibration Data (4) We can combine the histograms in a single window by using the subplot command to create an array of plots.. The syntax is subplot(nrow,ncol,p) where nrow is the number of rows in the array, ncol is the number of columns in the array, and p is a counter for the plot number in the array. The diagram to the right shows three possible layouts of subplots. All practical combinations of nrow and ncol are allowed. subplot(2,1,p) p = 1,2 1 subplot(3,2,p) p = 1,2, subplot(nprow,2,p) p = 1,2,...nc nprow nc EAS 199B: Engineering Problem Solving page 11

13 Histogram of the Calibration Data (5) The following code snippet uses the subplot command to layout the histograms for the columns of V in an nprow 2 array nc = size(v,2); % number of columns nprow = ceil(nc/2); % number of rows for array of subplots for j=1:nc subplot(nprow,2,j); % Move to the next subplot hist(v(:,j)); % Bin the data and plot the histogram ylim( [, 4] ); % Set the same y-axis limits in all plots end The plot_thermistor_histograms.m function (on the next slide) mass-produces histograms: one for each column in the data set. EAS 199B: Engineering Problem Solving page 12

14 Histogram of the Calibration Data (6) function plot_thermistor_histograms(fname) % plot_thermistor_histograms Plot histograms of calibration data for thermistor if nargin<1, fname= thermistor_data.txt ; end % Default name of data file % -- Load the data and compute summary statistics for each column D = load(fname); T = D(1,:); % Temperature values in first row V = D(2:end,:); % Voltage data in columns from second row until end Vave = mean(v); % Mean of data in each column Vmed = median(v); % Median of data in each column Vstd = std(v); % Standard deviation of each column nc = size(v,2); % Number of columns in V nprow = ceil(nc/2); % Number of rows in the array of histograms fprintf( \n T(C) mean(v) median(v) std_dev(v)\n ); for j=1:nc subplot(nprow,2,j); % Move to the next subplot hist(v(:,j)); % Bin the data and plot the histogram ylim( [, 4] ); % Set the same y-axis limits in all plots text(min(v(:,j))+.1, 33, sprintf( T = %-6.1f,T(j))); % label the subplot fprintf( %8.1f %8.1f %8.1f %8.2f\n,T(j),Vave(j),Vmed(j),Vstd(j)); end EAS 199B: Engineering Problem Solving page 13

15 Histogram of the Calibration Data (7) Variability at all temperatures the data sets is negligible. 4 2 T = T = T = T = T = T = T = T = T = T = T = EAS 199B: Engineering Problem Solving page 14

16 Summary data The plot_thermistor_histograms.m function also prints the mean, median and standard deviation of each column of data. Remember: each column contains the analog readings for a given calibration temperature. plot_thermistor_histograms T(C) mean(v) median(v) std_dev(v) The next step is to create a curve fit of the analog readings versus the temperature. EAS 199B: Engineering Problem Solving page 15

17 Calibration Curve Fit Equation The calibration process suggests a curve fit of the form V = f(t ): the water temperature was chosen by mixing warm and cold water supplies, and the voltage output was recorded with the Arduino. We could use a polynomial for V (T ). V = c 1 T n + c 2 T n c n 1 T + c n. (1) However, to control the temperature of the fish tank, we will need T = f(v ). T = a 1 V n + a 2 V n a n 1 V + a n. (2) EAS 199B: Engineering Problem Solving page 16

18 Polynomial Curve Fit in MATLAB Assume the data is in the T and Vave vectors. c = polyfit(t,vave,2); Tfit = linspace(min(t),max(t)); Vfit = polyval(c,tfit); plot(t,vave, o,tfit,vfit, r-- ); xlabel( Temperature (C) ); ylabel( Analog output ); Analog output The fit looks good, but we should dig deeper Temperature (C) EAS 199B: Engineering Problem Solving page 17

19 Residual of the Curve Fit (1) We often use R 2 as an indicator of the fit. There is more information in the residuals r i = y i y fit (x i ) where (x i, y i ) are the measured data and y fit (x) is the fitting function, e.g., a polynomial. r i = y i - y fit (x i ) EAS 199B: Engineering Problem Solving page 18

20 Residual of the Curve Fit (1) Given the curve fit evaluated with polyfit, we can compute the residuals in one line c = polyfit(t,vave,2); % coefficients of polynomial curve fit: V = f(t) rfit = Vave - polyval(c,t); % residuals of the fit: r(xi) = yi - f(xi) Vave is a row vector of the average for each column polyval(c,t) is a row vector of the curve fit evaluated at each of the measured T values. Vave - polyval(c,t) is a row vector of residuals: the difference between the measured (average) V values and the V values predicted by the curve fit. The fit_thermistor_calibration function puts the curve fit and residual computation and plot together in one m-file. EAS 199B: Engineering Problem Solving page 19

21 Matlab Function for Curve Fit function fit_thermistor_calibration(npoly,fname) % fit_thermistor_calibration Polynomial curve fits of calibration data for thermistor %... See fit_thermistor_calibration.m for missing code to read data and compute Vave % -- Perform curve fit c = polyfit(t,vave,npoly); fprintf( \ncurve fit coefficients\n ); fprintf( \t%12.7e\n,c); % -- Plot the curve fit Tfit = linspace(min(t),max(t)); vfit = polyval(c,tfit); subplot(2,1,1) plot(t,vave, o,tfit,vfit, r-- ); xlabel( Temperature (C) ); ylabel( Analog output ); legend( Data,sprintf( Degree %d poly fit,npoly), Location, Northwest ); % -- Evaluate residuals at the known (measured) input values rfit = Vave - polyval(c,t); subplot(2,1,2) plot(t,rfit, o ); xlabel( Temperature (C) ); ylabel( Residual of the fit ); EAS 199B: Engineering Problem Solving page 2

22 Matlab Quadratic Curve Fit fit_thermistor_calibration(2) produces a quadratic fit and a residual plot Analog output Data Degree 2 poly fit Temperature (C) 1 Residual of the fit Temperature (C) EAS 199B: Engineering Problem Solving page 21

23 Matlab Quadratic Curve fit Notice that the residuals appear to have a pattern. The quadratic fit is missing information in the data. Analog output Data Degree 2 poly fit Temperature (C) 1 Residual of the fit Temperature (C) EAS 199B: Engineering Problem Solving page 22

24 Matlab Cubic Curve Fit fit_thermistor_calibration(3) produces a cubic fit. The residuals appear to be random When the residuals are random, stop increasing the order of the polynomial. Analog output Data Degree 3 poly fit Temperature (C) 6 Residual of the fit Temperature (C) EAS 199B: Engineering Problem Solving page 23

A Curve-Fitting Cookbook for use with the NMM Toolbox

A Curve-Fitting Cookbook for use with the NMM Toolbox A Curve-Fitting Cookbook for use with the NMM Toolbox Gerald Recktenwald October 17, 2000 Abstract Computational steps for obtaining curve fits with Matlab are described. The steps include reading data

More information

Organizing and Debugging Matlab Programs

Organizing and Debugging Matlab Programs Organizing and Debugging Matlab Programs Gerald Recktenwald Portland State University Department of Mechanical Engineering These slides are a supplement to the book Numerical Methods with Matlab: Implementations

More information

Interactive Computing with Matlab. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University

Interactive Computing with Matlab. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University Interactive Computing with Matlab Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu Starting Matlab Double click on the Matlab icon, or on unix systems

More information

ENGR Fall Exam 1 PRACTICE EXAM

ENGR Fall Exam 1 PRACTICE EXAM ENGR 13100 Fall 2012 Exam 1 PRACTICE 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.

More information

MATLAB Examples. Interpolation and Curve Fitting. Hans-Petter Halvorsen

MATLAB Examples. Interpolation and Curve Fitting. Hans-Petter Halvorsen MATLAB Examples Interpolation and Curve Fitting Hans-Petter Halvorsen Interpolation Interpolation is used to estimate data points between two known points. The most common interpolation technique is Linear

More information

ENGR Fall Exam 1

ENGR Fall Exam 1 ENGR 13100 Fall 2012 Exam 1 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

Data needs to be prepped for loading into matlab.

Data needs to be prepped for loading into matlab. Outline Preparing data sets CTD Data from Tomales Bay Clean up Binning Combined Temperature Depth plots T S scatter plots Multiple plots on a single figure What haven't you learned in this class? Preparing

More information

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER BENC 2113 DENC ECADD 2532 ECADD LAB SESSION 6/7 LAB

More information

Data Management Project Using Software to Carry Out Data Analysis Tasks

Data Management Project Using Software to Carry Out Data Analysis Tasks Data Management Project Using Software to Carry Out Data Analysis Tasks This activity involves two parts: Part A deals with finding values for: Mean, Median, Mode, Range, Standard Deviation, Max and Min

More information

Graphical Analysis of Data using Microsoft Excel [2016 Version]

Graphical Analysis of Data using Microsoft Excel [2016 Version] Graphical Analysis of Data using Microsoft Excel [2016 Version] Introduction In several upcoming labs, a primary goal will be to determine the mathematical relationship between two variable physical parameters.

More information

Fitting data with Matlab

Fitting data with Matlab Fitting data with Matlab 1. Generate a delimited text file (from LabVIEW, a text editor, Excel, or another spreadsheet application) with the x values (time) in the first column and the y values (temperature)

More information

Using Excel for Graphical Analysis of Data

Using Excel for Graphical Analysis of Data Using Excel for Graphical Analysis of Data Introduction In several upcoming labs, a primary goal will be to determine the mathematical relationship between two variable physical parameters. Graphs are

More information

MATH Intro to Scientific Computation - Fall Lab 7. Curve Fitting and Interpolation in MATLAB (Chapter 8)

MATH Intro to Scientific Computation - Fall Lab 7. Curve Fitting and Interpolation in MATLAB (Chapter 8) MATH 3670 - Intro to Scientific Computation - Fall 2017 Lab 7. Curve Fitting and Interpolation in MATLAB (Chapter 8) Content - Linear Interpolation - Spline Interpolation - Polynomial Fitting - Exponential

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

EE 1105 Pre-lab 3 MATLAB - the ins and outs

EE 1105 Pre-lab 3 MATLAB - the ins and outs EE 1105 Pre-lab 3 MATLAB - the ins and outs INTRODUCTION MATLAB is a software tool used by engineers for wide variety of day to day tasks. MATLAB is available for UTEP s students via My Desktop. To access

More information

MATLAB. Input/Output. CS101 lec

MATLAB. Input/Output. CS101 lec MATLAB CS101 lec24 Input/Output 2018-04-18 MATLAB Review MATLAB Review Question ( 1 2 3 4 5 6 ) How do we access 6 in this array? A A(2,1) B A(1,2) C A(3,2) D A(2,3) MATLAB Review Question ( 1 2 3 4 5

More information

Using Excel for Graphical Analysis of Data

Using Excel for Graphical Analysis of Data EXERCISE Using Excel for Graphical Analysis of Data Introduction In several upcoming experiments, a primary goal will be to determine the mathematical relationship between two variable physical parameters.

More information

Objectives. 1 Running, and Interface Layout. 2 Toolboxes, Documentation and Tutorials. 3 Basic Calculations. PS 12a Laboratory 1 Spring 2014

Objectives. 1 Running, and Interface Layout. 2 Toolboxes, Documentation and Tutorials. 3 Basic Calculations. PS 12a Laboratory 1 Spring 2014 PS 12a Laboratory 1 Spring 2014 Objectives This session is a tutorial designed to a very quick overview of some of the numerical skills that you ll need to get started. Throughout the tutorial, the instructors

More information

Select the Points You ll Use. Tech Assignment: Find a Quadratic Function for College Costs

Select the Points You ll Use. Tech Assignment: Find a Quadratic Function for College Costs In this technology assignment, you will find a quadratic function that passes through three of the points on each of the scatter plots you created in an earlier technology assignment. You will need the

More information

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010 Lecture 8, Ceng375 Numerical Computations at December 9, 2010 Computer Engineering Department Çankaya University 8.1 Contents 1 2 3 8.2 : These provide a more efficient way to construct an interpolating

More information

10.1 Probability Distributions

10.1 Probability Distributions >> Lectures >> Matlab 10 Navigator 10.1 Probability Distributions This section discusses two basic probability density functions and probability distributions: uniform and normal, Gaussian mixture models,

More information

Arduino Programming Part 7: Flow charts and Top-down design

Arduino Programming Part 7: Flow charts and Top-down design Arduino Programming Part 7: Flow charts and Top-down design EAS 199B, Winter 2013 Gerald Recktenwald Portland State University gerry@me.pdx.edu Goals Introduce flow charts A tool for developing algorithms

More information

Computing Fundamentals Plotting

Computing Fundamentals Plotting Computing Fundamentals Plotting Salvatore Filippone salvatore.filippone@uniroma2.it 2014 2015 (salvatore.filippone@uniroma2.it) Plotting 2014 2015 1 / 14 Plot function The basic function to plot something

More information

ENGR Fall Exam 1

ENGR Fall Exam 1 ENGR 1300 Fall 01 Exam 1 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

Data Table from an Equation

Data Table from an Equation 1 Data Table from an Equation How do you create a data table from an equation - to present and export the values - to plot the data We will look at these features in SigmaPlot 1. Linear Regression 2. Regression

More information

Plotting - Practice session

Plotting - Practice session Plotting - Practice session Alessandro Fanfarillo - Salvatore Filippone fanfarillo@ing.uniroma2.it May 28th, 2013 (fanfarillo@ing.uniroma2.it) Plotting May 28th, 2013 1 / 14 Plot function The basic function

More information

Data and Function Plotting with MATLAB (Linux-10)

Data and Function Plotting with MATLAB (Linux-10) Data and Function Plotting with MATLAB (Linux-10) This tutorial describes the use of MATLAB for general plotting of experimental data and equations and for special plots like histograms. (Astronomers -

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

Polymath 6. Overview

Polymath 6. Overview Polymath 6 Overview Main Polymath Menu LEQ: Linear Equations Solver. Enter (in matrix form) and solve a new system of simultaneous linear equations. NLE: Nonlinear Equations Solver. Enter and solve a new

More information

Excel 2013 Charts and Graphs

Excel 2013 Charts and Graphs Excel 2013 Charts and Graphs Copyright 2016 Faculty and Staff Training, West Chester University. A member of the Pennsylvania State System of Higher Education. No portion of this document may be reproduced

More information

Logger Pro 3. Quick Reference

Logger Pro 3. Quick Reference Logger Pro 3 Quick Reference Getting Started Logger Pro Requirements To use Logger Pro, you must have the following equipment: Windows 98, 2000, ME, NT, or XP on a Pentium processor or equivalent, 133

More information

Getting Started with MATLAB

Getting Started with MATLAB APPENDIX B Getting Started with MATLAB MATLAB software is a computer program that provides the user with a convenient environment for many types of calculations in particular, those that are related to

More information

Chapter 3: Rate Laws Excel Tutorial on Fitting logarithmic data

Chapter 3: Rate Laws Excel Tutorial on Fitting logarithmic data Chapter 3: Rate Laws Excel Tutorial on Fitting logarithmic data The following table shows the raw data which you need to fit to an appropriate equation k (s -1 ) T (K) 0.00043 312.5 0.00103 318.47 0.0018

More information

Experiment 1 CH Fall 2004 INTRODUCTION TO SPREADSHEETS

Experiment 1 CH Fall 2004 INTRODUCTION TO SPREADSHEETS Experiment 1 CH 222 - Fall 2004 INTRODUCTION TO SPREADSHEETS Introduction Spreadsheets are valuable tools utilized in a variety of fields. They can be used for tasks as simple as adding or subtracting

More information

Getting Started with MATLAB

Getting Started with MATLAB Getting Started with MATLAB Math 315, Fall 2003 Matlab is an interactive system for numerical computations. It is widely used in universities and industry, and has many advantages over languages such as

More information

Minitab 17 commands Prepared by Jeffrey S. Simonoff

Minitab 17 commands Prepared by Jeffrey S. Simonoff Minitab 17 commands Prepared by Jeffrey S. Simonoff Data entry and manipulation To enter data by hand, click on the Worksheet window, and enter the values in as you would in any spreadsheet. To then save

More information

Automatic Reporting. Real-Time and Wireless Recording and Alarming

Automatic Reporting. Real-Time and Wireless Recording and Alarming Automatic Reporting The software's Automatic Report Generator offers the ability to combine and analyze data from multiple loggers into a single report. The delta,minimum, and maximum statistics can be

More information

ROSE-HULMAN INSTITUTE OF TECHNOLOGY

ROSE-HULMAN INSTITUTE OF TECHNOLOGY EXAM 2 WRITTEN PORTION NAME SECTION NUMBER CAMPUS MAILBOX NUMBER EMAIL ADDRESS @rose-hulman.edu Written Portion / 40 Computer Portion / 60 Total / 100 USE MATLAB SYNTAX FOR ALL PROGRAMS AND COMMANDS YOU

More information

Introduction to ANSYS DesignXplorer

Introduction to ANSYS DesignXplorer Lecture 4 14. 5 Release Introduction to ANSYS DesignXplorer 1 2013 ANSYS, Inc. September 27, 2013 s are functions of different nature where the output parameters are described in terms of the input parameters

More information

Objectives. 1 Basic Calculations. 2 Matrix Algebra. Physical Sciences 12a Lab 0 Spring 2016

Objectives. 1 Basic Calculations. 2 Matrix Algebra. Physical Sciences 12a Lab 0 Spring 2016 Physical Sciences 12a Lab 0 Spring 2016 Objectives This lab is a tutorial designed to a very quick overview of some of the numerical skills that you ll need to get started in this class. It is meant to

More information

INTRODUCTION TO MATLAB PLOTTING WITH MATLAB

INTRODUCTION TO MATLAB PLOTTING WITH MATLAB 1 INTRODUCTION TO MATLAB PLOTTING WITH MATLAB Plotting with MATLAB x-y plot Plotting with MATLAB MATLAB contains many powerful functions for easily creating plots of several different types. Command plot(x,y)

More information

Fathom Tutorial. Dynamic Statistical Software. for teachers of Ontario grades 7-10 mathematics courses

Fathom Tutorial. Dynamic Statistical Software. for teachers of Ontario grades 7-10 mathematics courses Fathom Tutorial Dynamic Statistical Software for teachers of Ontario grades 7-10 mathematics courses Please Return This Guide to the Presenter at the End of the Workshop if you would like an electronic

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab By:Mohammad Sadeghi *Dr. Sajid Gul Khawaja Slides has been used partially to prepare this presentation Outline: What is Matlab? Matlab Screen Basic functions Variables, matrix, indexing

More information

ECE 3793 Matlab Project 1

ECE 3793 Matlab Project 1 ECE 3793 Matlab Project 1 Spring 2017 Dr. Havlicek DUE: 02/04/2017, 11:59 PM Introduction: You will need to use Matlab to complete this assignment. So the first thing you need to do is figure out how you

More information

CDA5530: Performance Models of Computers and Networks. Chapter 8: Using Matlab for Performance Analysis and Simulation

CDA5530: Performance Models of Computers and Networks. Chapter 8: Using Matlab for Performance Analysis and Simulation CDA5530: Performance Models of Computers and Networks Chapter 8: Using Matlab for Performance Analysis and Simulation Objective Learn a useful tool for mathematical analysis and simulation Interpreted

More information

Design of Experiments

Design of Experiments Seite 1 von 1 Design of Experiments Module Overview In this module, you learn how to create design matrices, screen factors, and perform regression analysis and Monte Carlo simulation using Mathcad. Objectives

More information

Assignment 2. with (a) (10 pts) naive Gauss elimination, (b) (10 pts) Gauss with partial pivoting

Assignment 2. with (a) (10 pts) naive Gauss elimination, (b) (10 pts) Gauss with partial pivoting Assignment (Be sure to observe the rules about handing in homework). Solve: with (a) ( pts) naive Gauss elimination, (b) ( pts) Gauss with partial pivoting *You need to show all of the steps manually.

More information

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 53L Fall Test I. Rebecca A. Simmons & Michael R. Gustafson II

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 53L Fall Test I. Rebecca A. Simmons & Michael R. Gustafson II 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 53L Fall 2009 Test I Rebecca A. Simmons & Michael R. Gustafson II Name and NET ID (please print) In keeping with the Community Standard, I have neither

More information

ME 121 Gerald Recktenwald Portland State University

ME 121 Gerald Recktenwald Portland State University Arduino Programming Part 7: Flow charts and Top-down design ME 121 Gerald Recktenwald Portland State University gerry@me.pdx.edu Goals Introduce flow charts A tool for developing algorithms A tool for

More information

Name: INSERT YOUR NAME HERE UWNetID: INSERT YOUR NETID

Name: INSERT YOUR NAME HERE UWNetID: INSERT YOUR NETID AMath 584 Homework 3 Due to dropbox by 6pm PDT, November 4, 2011 Name: INSERT YOUR NAME HERE UWNetID: INSERT YOUR NETID Use latex for this assignment! Submit a pdf file to the dropbox. You do not need

More information

This is called the vertex form of the quadratic equation. To graph the equation

This is called the vertex form of the quadratic equation. To graph the equation Name Period Date: Topic: 7-5 Graphing ( ) Essential Question: What is the vertex of a parabola, and what is its axis of symmetry? Standard: F-IF.7a Objective: Graph linear and quadratic functions and show

More information

Non Linear Calibration Curve and Polynomial

Non Linear Calibration Curve and Polynomial Non Linear Calibration Curve and Polynomial by Dr. Colin Mercer, Technical Director, Prosig Not all systems vary linearly. The issue discussed here is determining a non linear calibration curve and, if

More information

Total Number of Students in US (millions)

Total Number of Students in US (millions) The goal of this technology assignment is to graph a formula on your calculator and in Excel. This assignment assumes that you have a TI 84 or similar calculator and are using Excel 2007. The formula you

More information

MATH 51: MATLAB HOMEWORK 3

MATH 51: MATLAB HOMEWORK 3 MATH 5: MATLAB HOMEWORK Experimental data generally suffers from imprecision, though frequently one can predict how data should behave by graphing results collected from experiments. For instance, suppose

More information

How to Make Graphs in EXCEL

How to Make Graphs in EXCEL How to Make Graphs in EXCEL The following instructions are how you can make the graphs that you need to have in your project.the graphs in the project cannot be hand-written, but you do not have to use

More information

Starting a New Matlab m.file. Matlab m.files. Matlab m.file Editor/Debugger. The clear all Command. Our Program So Far

Starting a New Matlab m.file. Matlab m.files. Matlab m.file Editor/Debugger. The clear all Command. Our Program So Far Matlab m.files It is not very convenient to do work directly in the Matlab Command Line Window since: It is hard to remember what we typed. It is hard to edit. It all disappears when we close Matlab. Solution:

More information

EK307 Lab: Microcontrollers

EK307 Lab: Microcontrollers EK307 Lab: Microcontrollers Laboratory Goal: Program a microcontroller to perform a variety of digital tasks. Learning Objectives: Learn how to program and use the Atmega 323 microcontroller Suggested

More information

LAB 1 INSTRUCTIONS DESCRIBING AND DISPLAYING DATA

LAB 1 INSTRUCTIONS DESCRIBING AND DISPLAYING DATA LAB 1 INSTRUCTIONS DESCRIBING AND DISPLAYING DATA This lab will assist you in learning how to summarize and display categorical and quantitative data in StatCrunch. In particular, you will learn how to

More information

EGR 102 Introduction to Engineering Modeling. Lab 05B Plotting

EGR 102 Introduction to Engineering Modeling. Lab 05B Plotting EGR 102 Introduction to Engineering Modeling Lab 05B Plotting 1 Overview Plotting in MATLAB 2D plotting ( ezplot(), fplot(), plot()) Formatting of 2D plots 3D plotting (surf(), mesh(), plot3()) Formatting

More information

Assignment 02 (Due: Monday, February 1, 2016)

Assignment 02 (Due: Monday, February 1, 2016) Assignment 02 (Due: Monday, February 1, 2016) CSCE 155N 1 Lab Objectives Improve your understanding of arrays and array operations Differentiate array operators and matrix operators Create, access, modify,

More information

Models for Nurses: Quadratic Model ( ) Linear Model Dx ( ) x Models for Doctors:

Models for Nurses: Quadratic Model ( ) Linear Model Dx ( ) x Models for Doctors: The goal of this technology assignment is to graph several formulas in Excel. This assignment assumes that you using Excel 2007. The formula you will graph is a rational function formed from two polynomials,

More information

Math Scientific Computing - Matlab Intro and Exercises: Spring 2003

Math Scientific Computing - Matlab Intro and Exercises: Spring 2003 Math 64 - Scientific Computing - Matlab Intro and Exercises: Spring 2003 Professor: L.G. de Pillis Time: TTh :5pm 2:30pm Location: Olin B43 February 3, 2003 Matlab Introduction On the Linux workstations,

More information

[1] CURVE FITTING WITH EXCEL

[1] CURVE FITTING WITH EXCEL 1 Lecture 04 February 9, 2010 Tuesday Today is our third Excel lecture. Our two central themes are: (1) curve-fitting, and (2) linear algebra (matrices). We will have a 4 th lecture on Excel to further

More information

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation CDA6530: Performance Models of Computers and Networks Chapter 4: Using Matlab for Performance Analysis and Simulation Objective Learn a useful tool for mathematical analysis and simulation Interpreted

More information

MATLAB Vocabulary. Gerald Recktenwald. Version 0.965, 25 February 2017

MATLAB Vocabulary. Gerald Recktenwald. Version 0.965, 25 February 2017 MATLAB Vocabulary Gerald Recktenwald Version 0.965, 25 February 2017 MATLAB is a software application for scientific computing developed by the Mathworks. MATLAB runs on Windows, Macintosh and Unix operating

More information

Please consider the environment before printing this tutorial. Printing is usually a waste.

Please consider the environment before printing this tutorial. Printing is usually a waste. Ortiz 1 ESCI 1101 Excel Tutorial Fall 2011 Please consider the environment before printing this tutorial. Printing is usually a waste. Many times when doing research, the graphical representation of analyzed

More information

To Plot a Graph in Origin. Example: Number of Counts from a Geiger- Müller Tube as a Function of Supply Voltage

To Plot a Graph in Origin. Example: Number of Counts from a Geiger- Müller Tube as a Function of Supply Voltage To Plot a Graph in Origin Example: Number of Counts from a Geiger- Müller Tube as a Function of Supply Voltage 1 Digression on Error Bars What entity do you use for the magnitude of the error bars? Standard

More information

EE 350. Continuous-Time Linear Systems. Recitation 1. 1

EE 350. Continuous-Time Linear Systems. Recitation 1. 1 EE 350 Continuous-Time Linear Systems Recitation 1 Recitation 1. 1 Recitation 1 Topics MATLAB Programming Basic Operations, Built-In Functions, and Variables m-files Graphics: 2D plots EE 210 Review Branch

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

5.1 Introduction to the Graphs of Polynomials

5.1 Introduction to the Graphs of Polynomials Math 3201 5.1 Introduction to the Graphs of Polynomials In Math 1201/2201, we examined three types of polynomial functions: Constant Function - horizontal line such as y = 2 Linear Function - sloped line,

More information

Welcome to Microsoft Excel 2013 p. 1 Customizing the QAT p. 5 Customizing the Ribbon Control p. 6 The Worksheet p. 6 Excel 2013 Specifications and

Welcome to Microsoft Excel 2013 p. 1 Customizing the QAT p. 5 Customizing the Ribbon Control p. 6 The Worksheet p. 6 Excel 2013 Specifications and Preface p. xi Welcome to Microsoft Excel 2013 p. 1 Customizing the QAT p. 5 Customizing the Ribbon Control p. 6 The Worksheet p. 6 Excel 2013 Specifications and Limits p. 9 Compatibility with Other Versions

More information

Practical 4: The Integrate & Fire neuron

Practical 4: The Integrate & Fire neuron Practical 4: The Integrate & Fire neuron 2014 version by Mark van Rossum 2018 version by Matthias Hennig and Theoklitos Amvrosiadis 16th October 2018 1 Introduction to MATLAB basics You can start MATLAB

More information

ELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah)

ELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah) Introduction ELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah) MATLAB is a powerful mathematical language that is used in most engineering companies today. Its strength lies

More information

ME422 Mechanical Control Systems Matlab/Simulink Hints and Tips

ME422 Mechanical Control Systems Matlab/Simulink Hints and Tips Cal Poly San Luis Obispo Mechanical Engineering ME Mechanical Control Systems Matlab/Simulink Hints and Tips Ridgely/Owen, last update Jan Building A Model The way in which we construct models for analyzing

More information

Statistics with a Hemacytometer

Statistics with a Hemacytometer Statistics with a Hemacytometer Overview This exercise incorporates several different statistical analyses. Data gathered from cell counts with a hemacytometer is used to explore frequency distributions

More information

Pre-Lab Excel Problem

Pre-Lab Excel Problem Pre-Lab Excel Problem Read and follow the instructions carefully! Below you are given a problem which you are to solve using Excel. If you have not used the Excel spreadsheet a limited tutorial is given

More information

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation CDA6530: Performance Models of Computers and Networks Chapter 4: Using Matlab for Performance Analysis and Simulation Objective Learn a useful tool for mathematical analysis and simulation Interpreted

More information

Overview. Lecture 13: Graphics and Visualisation. Graphics & Visualisation 2D plotting. Graphics and visualisation of data in Matlab

Overview. Lecture 13: Graphics and Visualisation. Graphics & Visualisation 2D plotting. Graphics and visualisation of data in Matlab Overview Lecture 13: Graphics and Visualisation Graphics & Visualisation 2D plotting 1. Plots for one or multiple sets of data, logarithmic scale plots 2. Axis control & Annotation 3. Other forms of 2D

More information

Technology Assignment: Scatter Plots

Technology Assignment: Scatter Plots The goal of this assignment is to create a scatter plot of a set of data. You could do this with any two columns of data, but for demonstration purposes we ll work with the data in the table below. You

More information

Achieving Ultra High Accuracy in Temperature Measurements With Thermocouples by Calibration of Thermocouple Wire at Multiple Points

Achieving Ultra High Accuracy in Temperature Measurements With Thermocouples by Calibration of Thermocouple Wire at Multiple Points November 8, 2013 Achieving Ultra High Accuracy in Temperature Measurements With Thermocouples by Calibration of Thermocouple Wire at Multiple Points Jerry Gaffney, Chief Engineer GEC Instruments, 5530

More information

Here is Kellogg s custom menu for their core statistics class, which can be loaded by typing the do statement shown in the command window at the very

Here is Kellogg s custom menu for their core statistics class, which can be loaded by typing the do statement shown in the command window at the very Here is Kellogg s custom menu for their core statistics class, which can be loaded by typing the do statement shown in the command window at the very bottom of the screen: 4 The univariate statistics command

More information

Excel Functions & Tables

Excel Functions & Tables Excel Functions & Tables Fall 2014 Fall 2014 CS130 - Excel Functions & Tables 1 Review of Functions Quick Mathematics Review As it turns out, some of the most important mathematics for this course revolves

More information

Statistics 528: Minitab Handout 1

Statistics 528: Minitab Handout 1 Statistics 528: Minitab Handout 1 Throughout the STAT 528-530 sequence, you will be asked to perform numerous statistical calculations with the aid of the Minitab software package. This handout will get

More information

Activity 7. The Slope of the Tangent Line (Part 2) Objectives. Introduction. Problem

Activity 7. The Slope of the Tangent Line (Part 2) Objectives. Introduction. Problem Activity 7 Objectives Use the CellSheet App to find the approximate slope of a tangent line of a curve Compare the x-slope relationship of parabolic and cubic curves Introduction In Activity 6, you found

More information

a. Prepare a worksheet with two columns of 4 data values. b. Initiate Macro recording. Name it SemilogPlot with CTRL-s as shortcut key.

a. Prepare a worksheet with two columns of 4 data values. b. Initiate Macro recording. Name it SemilogPlot with CTRL-s as shortcut key. CM3215 Fall 2009 Excel Programming Exercises: 1. Designing a macro to do semilog plots. I. Record a. Prepare a worksheet with two columns of 4 data values. b. Initiate Macro recording. Name it SemilogPlot

More information

Spreadsheet View and Basic Statistics Concepts

Spreadsheet View and Basic Statistics Concepts Spreadsheet View and Basic Statistics Concepts GeoGebra 3.2 Workshop Handout 9 Judith and Markus Hohenwarter www.geogebra.org Table of Contents 1. Introduction to GeoGebra s Spreadsheet View 2 2. Record

More information

ENGG1811: Data Analysis using Spreadsheets Part 1 1

ENGG1811: Data Analysis using Spreadsheets Part 1 1 ENGG1811 Computing for Engineers Data Analysis using Spreadsheets 1 I Data Analysis Pivot Tables Simple Statistics Histogram Correlation Fitting Equations to Data Presenting Charts Solving Single-Variable

More information

IT 403 Practice Problems (1-2) Answers

IT 403 Practice Problems (1-2) Answers IT 403 Practice Problems (1-2) Answers #1. Using Tukey's Hinges method ('Inclusionary'), what is Q3 for this dataset? 2 3 5 7 11 13 17 a. 7 b. 11 c. 12 d. 15 c (12) #2. How do quartiles and percentiles

More information

Examples, examples: Outline

Examples, examples: Outline Examples, examples: Outline Overview of todays exercises Basic scripting Importing data Working with temporal data Working with missing data Interpolation in 1D Some time series analysis Linear regression

More information

Numerical Methods with Matlab: Implementations and Applications. Gerald W. Recktenwald. Chapter 10 Interpolation

Numerical Methods with Matlab: Implementations and Applications. Gerald W. Recktenwald. Chapter 10 Interpolation Selected Solutions for Exercises in Numerical Methods with Matlab: Implementations and Applications Gerald W. Recktenwald Chapter 10 Interpolation The following pages contain solutions to selected end-of-chapter

More information

Read Temperature Data

Read Temperature Data Read Temperature Data Exercise 5 Completed front panel and block diagram In this exercise, you will create a program using SensorDAQ s Analog Express VI to collect temperature data and display it on a

More information

8 2 Properties of a normal distribution.notebook Properties of the Normal Distribution Pages

8 2 Properties of a normal distribution.notebook Properties of the Normal Distribution Pages 8 2 Properties of the Normal Distribution Pages 422 431 normal distribution a common continuous probability distribution in which the data are distributed symmetrically and unimodally about the mean. Can

More information

Scientific Graphing in Excel 2013

Scientific Graphing in Excel 2013 Scientific Graphing in Excel 2013 When you start Excel, you will see the screen below. Various parts of the display are labelled in red, with arrows, to define the terms used in the remainder of this overview.

More information

Section 7 Mixture Design Tutorials

Section 7 Mixture Design Tutorials Rev. 11/16/00 Section 7 Mixture Design Tutorials Mixture Design and Analysis This tutorial shows how you can use Design-Expert software for mixture experiments. A case study provides a real-life feel to

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

CS/NEUR125 Brains, Minds, and Machines. Due: Wednesday, March 8

CS/NEUR125 Brains, Minds, and Machines. Due: Wednesday, March 8 CS/NEUR125 Brains, Minds, and Machines Lab 6: Inferring Location from Hippocampal Place Cells Due: Wednesday, March 8 This lab explores how place cells in the hippocampus encode the location of an animal

More information

DO NOT USE GLOBAL VARIABLES!

DO NOT USE GLOBAL VARIABLES! Problem #1 Use the MATLAB script named trajectory.m. The program plots the ballistic 2-D trajectory of a projectile. The only force acting on the projectile is gravity. As written, the projectile s initial

More information

Homework 1 Excel Basics

Homework 1 Excel Basics Homework 1 Excel Basics Excel is a software program that is used to organize information, perform calculations, and create visual displays of the information. When you start up Excel, you will see the

More information

INSTRUCTIONS FOR USING MICROSOFT EXCEL PERFORMING DESCRIPTIVE AND INFERENTIAL STATISTICS AND GRAPHING

INSTRUCTIONS FOR USING MICROSOFT EXCEL PERFORMING DESCRIPTIVE AND INFERENTIAL STATISTICS AND GRAPHING APPENDIX INSTRUCTIONS FOR USING MICROSOFT EXCEL PERFORMING DESCRIPTIVE AND INFERENTIAL STATISTICS AND GRAPHING (Developed by Dr. Dale Vogelien, Kennesaw State University) ** For a good review of basic

More information

Working with Census Data Excel 2013

Working with Census Data Excel 2013 Working with Census Data Excel 2013 Preparing the File If you see a lot of little green triangles next to the numbers, there is an error or warning that Excel is trying to call to your attention. In my

More information