12.010 Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room 54-820A, Chris Hill, Room 54-1511,

Slides:



Advertisements
Similar presentations
Lecture 4 Basic Scripting. Administrative  Files on the website will be posted in pdf for compatibility  Website is now mirrored at:
Advertisements

1 Microsoft Access 2002 Tutorial 9 – Automating Tasks With Macros.
MP IP Strategy Stateye-GUI Provided by Edotronik Munich, May 05, 2006.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
MATLAB Presented By: Nathalie Tacconi Presented By: Nathalie Tacconi Originally Prepared By: Sheridan Saint-Michel Originally Prepared By: Sheridan Saint-Michel.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Chapter 4 Adding Images. Inserting and Aligning Images Using CSS When you choose graphics to add to a web page, it’s important to use graphic files in.
PowerPoint: Tables Computer Information Technology Section 5-11 Some text and examples used with permission from: Note: We are.
Principles of the Global Positioning System Lecture 10 Prof. Thomas Herring Room A;
Using Frames in a Web Site
Matrices Write and Augmented Matrix of a system of Linear Equations Write the system from the augmented matrix Solve Systems of Linear Equations using.
1 Systems of Linear Equations & Matrices Sections 4.2 & 4.3 After today’s lesson, you will be able to Use terms associated with matrices. Set up and solve.
Principles of the Global Positioning System Lecture 11 Prof. Thomas Herring Room A;
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Digital Image Processing Lecture3: Introduction to MATLAB.
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
Word Processing ADE100- Computer Literacy Lecture 12.
Carolina Environmental Program UNC Chapel Hill The Analysis Engine – A New Tool for Model Evaluation, Sensitivity and Uncertainty Analysis, and more… Alison.
European Computer Driving Licence Syllabus version 5.0 Module 4 – Spreadsheets Chapter 22 – Functions Pass ECDL5 for Office 2007 Module 4 Spreadsheets.
Lecture 1 Saima Gul. What is a Project? A Project is a job that has a beginning and an end (time), a specified outcome ( scope) at a stated level of quality.
1 Tips for solving Project 1 Reactor SO 3 SO 2 +O 2.
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
Introduction to Matlab & Data Analysis
Introduction With TimeCard users can tag SharePoint events with information that converts them into time sheets. This way they can report.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 7 – Adding and.
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
0 eCPIC User Training: Resource Library These training materials are owned by the Federal Government. They can be used or modified only by FESCOM member.
0 eCPIC User Training: Dependency Mapper These training materials are owned by the Federal Government. They can be used or modified only by FESCOM member.
Section 8.1 Create a custom theme Design a color scheme Use shared borders Section 8.2 Identify types of graphics Identify and compare graphic formats.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
MA3264 Mathematical Modelling Lecture 3 Model Fitting.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 4. Least squares.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
Modern Navigation Thomas Herring MW 11:00-12:30 Room
Network for Computational Nanotechnology (NCN) MEEPPV User Guide Xin Tze Tee Electrical and Computer Engineering Purdue University West Lafayette, IN
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
BOĞAZİÇİ UNIVERSITY DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS MATLAB AS A DATA MINING ENVIRONMENT.
Advanced Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, October 31, 2003.
Copyright © 2011 Pearson Education, Inc. Solving Linear Systems Using Matrices Section 6.1 Matrices and Determinants.
Principles of the Global Positioning System Lecture 12 Prof. Thomas Herring Room ;
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
EGR 115 Introduction to Computing for Engineers
Error Modeling Thomas Herring Room ;
Economic Data Sources on the Internet Su, Chapter 3.
Operating System Concepts Three User Interfaces Command-line Job-Control Language (JCL) Graphical User Interface (GUI)
Principles of the Global Positioning System Lecture 09 Prof. Thomas Herring Room A;
Lecture Model View Controller s/w architecture AND general tips on structuring classes.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
Academic Computing Services 2007 Microsoft Word 2010 Publishing Long Documents This Guide will teach you how to work with long documents such as dissertations.
Graphical User Interfaces I
More on Graphical User Interfaces
Use of Mathematics using Technology (Maltlab)
Principles of the Global Positioning System Lecture 11
Presentation transcript:

Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room , Web page

11/04/ Lec 172 Review of Last Lecture Analysis of the some of the functions needed for the GUI development in Matlab Look at functions which would be appropriate for the GPS data analysis GUI Looked at how to use graphics objects

11/04/ Lec 173 Today’s Lecture This is the last lecture on Matlab Analyze a complete GPS time series data analysis program –Basic idea is to display position estimates as function of time and to work with these data –Operations: De-trending (rate of change and breaks) Editing Implementation through a Graphical User Interface (GUI)

11/04/ Lec 174 Aims and Layout of program The GUI layout was designed using the Matlab guide tool. Basic features of GUI: –Time series of GPS positions are stored in files which contain 3 header records and then time (in decimal years), position (north measured as distance from equator, east measured as distance from Greenwich meridian, Up as ellipsoidal height). Values in meters Uncertainty given as a standard deviation Since the positions are large numbers, the leading digits greater than 10 meters are removed from the values in the file.

11/04/ Lec 175 GUI Features GUI needs to be able to: –Load data file –Append another file to the loaded file (needed since the data file are separated into before and after a major earthquake in California: Hector mine Oct 17, 1999) –Remove the linear trend from the data and possible jumps in the time series –Edit the time series (both as individual points and a selected region of the data) –Allows breaks when there appears to be jumps in the time series to be added –Allow zoom of the plot so that break times can be set.

11/04/ Lec 176 GUI Features 02 Figures below shows the lay out the GUI from different versions of Matlab

11/04/ Lec 177 GUI Features 03 In MatLab code that implements the GUI is contained in the M-files, GPSanal.m and gpsgui.m. (These files are in the Matlab section of the web page). GPSanal.mat is also needed to initialize some variables (can be avoided) In the lecture, these M-files will be examined in detail. The features of the GUI are: –Rather than listing file names, the names of the sites are extracted from file names and user selects a site and a component (North, East, Up) –The file name is regenerated by re-concatenating the parts of the file name back together.

11/04/ Lec 178 GUI Features 04 Nearly all of the callbacks for the GUI use the gpsgui.m function M-file and a series of cases in a switch function. (This approach has the advantage on not requiring large number of M-files to implement the GUI.) Because functions “forget” there values between calls (unless global or persistence is used specifically save values), the gpsgui.m function saves the values needed in the UserData structure for each of the objects. Some of the handles are known when the GUI is called because the handles of the call back objects (gcbo) are available, but in other cases we need to find the object using the findobj function and a unique Tag added to each object.

11/04/ Lec 179 Algorithms needed The main algorithms needed by this GUI are: –Least square fitting: We want to fit a function of the form pos(t) = pos(t o ) + vel*(t-t o ) + Sum(dpos i ) where pos(t) is position at time t, t o is a reference time (we use the mean time) vel is velocity dpos i are jumps in the time series at time given by the break times. –We can write the above equation in matrix form by making pos(t) a vector and the quantities to be estimated another vector

11/04/ Lec 1710 Algorithms 02 Defining another vector soln with entries soln = [pos(t o ) vel dpos 1 dpos 2... dpos n ] where n is the number of breaks Matrix form of equation is written as pos = A* soln where A is made up of rows that look like: A = [ 1 (t-t o ) 0 0 … 1] where the last group [0 0 … 1] depend on when the time of the measurement is with respect to the times of the breaks. The column value is 1 for all data times after the time of a break

11/04/ Lec 1711 Solution to Least squares problem Solution to the above problem is given by soln = inv(A’*A)*A’*pos (see Detrend case in gpsgui.m) We also compute the root-mean-square (RMS) of the fit to the model using rms = sqrt(res’*res/numdata) where res is the residual vector computed as the difference between the observed positions and the model estimate of the position, and numdata is the number of data. The rms of the residuals is used to estimate the standard deviation of the model parameter estimates.

11/04/ Lec 1712 Analysis of GUI Run through the gpsgui function, examining the way that the call backs and the objects in the GUI interact. The main features to examine are: –Use of UserData to save values –Use of tags to name and find objects –Use of button tool tips The sequence of using the GUI is to select a site and component (left hand sided options), Load the data, possibly select a continuation of the data and append it. Detrend and the edit, block edit, break, and zoom features allow detailed analysis of the data.

11/04/ Lec 1713 Data access in GUI’s Basic approaches are: –Use persistent variables. Easiest but there are problems if multiple instances of the GUI are used –Store the data (often as a structure) in the User Data part of the handle for a particular object. (This is method used examples) –Use the getappdata, setappdata, rmappdata and isappdata to get data, set data (done first), remove data. Generally tag is used to find correct handle. –Use guidata to save data in figure handle and retrieve data using data = guidata(gcbo); [graphic call back object). With this approach switchyard programming is not needed.

11/04/ Lec 1714 Final GPS Analysis tool On the web page, under Matlab is also the final version of GPS analysis tool called tsview.m This tool has the GUI interface re-arranged and enhanced with new button and features. This version also explicitly accounts for screen size and has a ResizeFcn to correctly change the GUI when the window is re-sized. EasyGUI is a toolkit for making GUI’s and is available from:

11/04/ Lec 1715 Conclusions In general in using Matlab: Use the helpdesk and helpwin to find functions that could be useful Remember the basic features of the language in the way that arrays, structures and cells are defined Remember the range selection devices Remember the control structures Remember that functions forget their values (and handles can forget the UserData and Tags as well). Matlab is very powerful for quick and easily set up problems for analyses involving matrices. Homework #5 has been set and is due December 2, 2010