Data needs to be prepped for loading into matlab.

Similar documents
Examples, examples: Outline

Chemistry 30 Tips for Creating Graphs using Microsoft Excel

Python Development Technical Note 4

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

EOSC 473/573 Matlab Tutorial R. Pawlowicz with changes by M. Halverson

Getting started with Matlab: Outline

ENGR Fall Exam 1 PRACTICE EXAM

Forston Labs LabNavigator

Introduction to CS graphs and plots in Excel Jacek Wiślicki, Laurent Babout,

LAB 2: DATA FILTERING AND NOISE REDUCTION

LAB 6: LOOP STATEMENTS

There is also a more in-depth GUI called the Curve Fitting Toolbox. To run this toolbox, type the command

Spreadsheet and Graphing Exercise Biology 210 Introduction to Research

Deconvolution and Imaging ASTR 240: In-class activity, April 1, 2013

Excel 2. Module 3 Advanced Charts

Excel Spreadsheets and Graphs

MATLAB Introduction to MATLAB Programming

0 Graphical Analysis Use of Excel

You are to turn in the following three graphs at the beginning of class on Wednesday, January 21.

Lab 6: Graphical Methods

WINTER 2017 ECE 102 ENGINEERING COMPUTATION STANDARD HOMEWORK #3 ECE DEPARTMENT PORTLAND STATE UNIVERSITY

Figure 1. Figure 2. The BOOTSTRAP

Appendix C. Vernier Tutorial

Microsoft Excel Using Excel in the Science Classroom

Dr Richard Greenaway

Setup Mount the //geobase/geo4315 server and add a new Lab2 folder in your user folder.

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

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

Appendix A. Introduction to MATLAB. A.1 What Is MATLAB?

Kulite DAQ. Data Acquisition Software User s Manual. Version 3.2.0

Here is the probability distribution of the errors (i.e. the magnitude of the errorbars):

ME 142 Engineering Computation I. Graphing with Excel

Appendix 1: DataStudio with ScienceWorkshop Sensors Tech Tips

BIOL 417: Biostatistics Laboratory #3 Tuesday, February 8, 2011 (snow day February 1) INTRODUCTION TO MYSTAT

LAB 2: DATA FILTERING AND NOISE REDUCTION

Introduction to MATLAB

Introduction to MATLAB

PROGRAMMING AND ENGINEERING COMPUTING WITH MATLAB Huei-Huang Lee SDC. Better Textbooks. Lower Prices.

Using Excel for Graphical Analysis of Data

Curve Fitting the Calibration Data of a Thermistor Voltage Divider

NENS 230 Assignment 4: Data Visualization

7 Exporting Numeric Data from ADAMS

Dr Richard Greenaway

SHOW ME THE NUMBERS: DESIGNING YOUR OWN DATA VISUALIZATIONS PEPFAR Applied Learning Summit September 2017 A. Chafetz

252 APPENDIX D EXPERIMENT 1 Introduction to Computer Tools and Uncertainties

D&B Market Insight Release Notes. November, 2015

Matlab Introduction. Scalar Variables and Arithmetic Operators

MATLAB Part 1 Oct

EXCEL SPREADSHEET TUTORIAL

Technology Assignment: Scatter Plots

ME422 Mechanical Control Systems Matlab/Simulink Hints and Tips

Math 121 Project 4: Graphs

Rockefeller College MPA Excel Workshop: Clinton Impeachment Data Example

Appendix A. HINTS WHEN USING EXCEL w

W1005 Intro to CS and Programming in MATLAB. Plo9ng & Visualiza?on. Fall 2014 Instructor: Ilia Vovsha. hgp://

9 POINTS TO A GOOD LINE GRAPH

Project 11 Graphs (Using MS Excel Version )

Basic plotting commands Types of plots Customizing plots graphically Specifying color Customizing plots programmatically Exporting figures

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

Fitting data with Matlab

Chemistry Excel. Microsoft 2007

Section 1 Establishing an Instrument Connection

Chapter 3: Rate Laws Excel Tutorial on Fitting logarithmic data

An introduction to plotting data

Scientific Graphing in Excel 2013

Graphical Analysis of Data using Microsoft Excel [2016 Version]

Getting started with MATLAB

[1] CURVE FITTING WITH EXCEL

MATLAB 1. Jeff Freymueller September 24, 2009

Table of Contents. Introduction.*.. 7. Part /: Getting Started With MATLAB 5. Chapter 1: Introducing MATLAB and Its Many Uses 7

Charts in Excel 2003

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

PERI INSTITUTE OF TECHNOLOGY DEPARTMENT OF ECE TWO DAYS NATIONAL LEVEL WORKSHOP ON COMMUNICATIONS & IMAGE PROCESSING "CIPM 2017" Matlab Fun - 2

Introduction and MATLAB Basics

Laboratory 1 Octave Tutorial

Homework 1 Excel Basics

Additional Plot Types and Plot Formatting

Spreadsheet Warm Up for SSAC Geology of National Parks Modules, 2: Elementary Spreadsheet Manipulations and Graphing Tasks

lab MS Excel 2010 active cell

12-Reading Data text: Chapter ECEGR 101 Engineering Problem Solving with Matlab Professor Henry Louie

Understand and plan a chart Create a chart Move and resize charts and chart objects Apply chart layouts and styles

Introduction to Matlab

Work with External Data in SPSS or Excel Format - Open SPSS data

Scientific Graphing in Excel 2007

Part 6b: The effect of scale on raster calculations mean local relief and slope

Intro to Matlab for GEOL 1520: Ocean Circulation and Climate or, Notions for the Motions of the Oceans

Introduction to Matlab. By: Hossein Hamooni Fall 2014

Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia

How to use Excel Spreadsheets for Graphing

Introduction to Programming in MATLAB

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

APPLICATION NOTE NO Revised August SBE 43 Dissolved Oxygen (DO) Sensor Hysteresis Corrections

CSC 2515 Introduction to Machine Learning Assignment 2

Overview. 2 Module 4: Data Conversion and Plotting

Microsoft Word for Report-Writing (2016 Version)

How to Make Graphs with Excel 2007

KaleidaGraph Quick Start Guide

MATLAB for beginners. KiJung Yoon, 1. 1 Center for Learning and Memory, University of Texas at Austin, Austin, TX 78712, USA

How to use the SATURN Observation Network: Endurance Stations Site: Table of Contents

Introduction to CS databases and statistics in Excel Jacek Wiślicki, Laurent Babout,

Transcription:

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 Data Data needs to be prepped for loading into matlab. Comment out all extraneous (usually non number) material that matlab can't use. Make sure there are no empty elements fill with missing data. Use a consistent symbol or marker for problem data If you are using excel, I suggest looking into the Matlab Excel Toolbox, particularly for time series data. Lets you pull and push data from excel to matlab Converts times and dates to matlab format for you You will still need to have relatively clean and organized data

Example: CTD data from Tomales Bay CTD stands for conductivity, temperature, depth. Measures temperature and salinity (as well as other things) as a function of depth underwater. Lowered into water from a boat on a rope down to a certain depth and then raised. Take a look at a data file in z:\pkg\wfcb\class5\data\tomales to see format. I have modified the files somewhat so they can easily be loaded. Meanings of each column are specified in the header of the files.

Basic plot A standard and interesting plot from a CTD is temperature (along the x axis) vs. depth (along the y axis) Exercise: Do this plot for the data file 13Oct2005_2108.cnv Hint: You will probably want to reverse the direction of the depth so that deeper is at the bottom. Correct plot is on next slide.

Depth / Temperature plot (5) At surface (1) Calibration (4) Surface Stratification (2) Downcast (3) Upcast

Cleaning up data Typically, only downcast is used as it is generally more accurate and has quicker response time. Also, need to remove calibration data near surface. Manufacturer has lots of GOOD programs to do this, but basic stuff can be done in matlab. Exercise: Remove upcast data and data within 0.5 meters of surface. Put code in a script so that you can later do it for all data files. Finally replot. Hint: Use the maximum depth to define split between down and up. Exercise 2: Make a function that would do this data cleanup for an arbitrary data matrix.

Binning data The next step is to bin data into depth bins. Again, manufacturer has programs for this. Exercise: Bin data so by the average value over every 0.5 meters starting at 0.5 meters depth. Then replot. Hint: Make a list of bin starting and ending points and then step through the list and compute average values. Hint: You will need to check to see if a bin actually has data. If not, then use NaN. continue might be useful for doing this. Exercise 2: Make a function that would do the binning for an arbitrary data matrix.

Loading in all the data So now that we know how to process one dataset, how about all of them. Files are numbered: 06 is at Tomales mouth, 08 is 2 km from mouth,..., 15 is 18 km from mouth. Exercise: Load and process all of the data files. As there are only ten, you could do each one separately. Or, you could use a more advanced approach and load them all using iteration. Hint: If doing each separately, cut & paste in a script. Hint: If using iteration, you might use a cell array to store filenames. Hint: Use a 3 D array to store all the results.

Combined Temperature Depth Plots Exercise: Plot all the Temp Depth curves on a single figure with a different color for each curve. Add a legend. Hint: This can be done with a single plot command if you pull out the appropriate data. The squeeze command might be useful. Or, you can use a for loop. Hint: You might want to use the jet command to get nice color. Exercise: Do the same thing for Salinity Depth and Fluorescence Depth. Do you see any patterns?

T S Scatter Plot Exercise: Using very similar techniques to the previous exercises, you can make a scatter plot of temperature vs. salinity. Hint: Use a 'linestyle' of '.'

Multiple axes on a single figure You can use the subplot command to put more than one set of plots on a single figure window. An example is:» clf» subplot( 1, 2, 1 )» plot( 1:10 )» subplot( 1, 2, 2 )» plot( (1:10).^2 ) Exercise: Can you use this model to place the T Depth figures on the left and the S Depth figures on the right.

What haven't you learned? I just want to point out a few things I haven't really taught in this class that might be of interest: Strings and cell arrays: These are quite important for dealing with text information Structures in more depth Debugging: Really important. There are some notes in class 4 related to this. 3D Graphics Exporting Figures to files Graphical User Interfaces (GUI): You can make interactive graphs. Look at guidetemplate for an example. Object oriented Programming: Often useful for modeling.