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

Slides:



Advertisements
Similar presentations
1 Microsoft Access 2002 Tutorial 9 – Automating Tasks With Macros.
Advertisements

1 Windows CIS*2450 Advancing Computing Techniques.
Chapter 6 Photoshop and ImageReady: Part II The Web Warrior Guide to Web Design Technologies.
1 Introduction to Word Chapter 3 Lecture Outline.
Microsoft Excel 2003 Illustrated Complete A Worksheet Formatting.
One of the most important skills a working professional possesses is the ability to express ideas, opinions, and research findings in writing, using word.
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 Exploring the Basics of Microsoft Windows XP1 Exploring the Basics of Windows XP.
Working with Vector Graphics – Lesson 21 Working with Vector Graphics Lesson 2.
1 How to create GUI's in MatLAB Rigo Dicochea. 2 Introduction Graphical User Interface (GUI) MatLab provides Graphical User Interface Development Environment(GUIDE)
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Advanced PowerPoint Cliff Solomon. 2 Presentation Outline Inserting Movies and Animations Into Your Presentations Using Progressive Disclosures and.
Matlab GUIs Making Matlab Interactive. Today’s topics What is a GUI? How does a GUI work? Where do you begin? Ways to build MATLAB GUIs.
Exploring the Basics of Windows XP
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Digital Image Processing Lecture3: Introduction to MATLAB.
Getting Started with Dreamweaver
Programming a GUI Hanan sedaghat pisheh. For calling GUI, we need a function with no inputs or outputs First We create a m.file m file has the same name.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
Microsoft Office Illustrated Introductory, Premium Edition A Worksheet Formatting.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
A short intermission about function handles and cell arrays A MATLAB function may be referenced by a handle. >> sphere(100)
Matlab GUIs GUIDE.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IE 411/511: Visual Programming for Industrial Applications
Introduction to Matlab & Data Analysis
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
XP Tutorial 1 Introduction to Macromedia Flash MX 2004.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
XP New Perspectives on Windows XP Tutorial 1 Exploring the Basics.
Tutorial 1 Introducing Adobe Flash CS3 Professional
Word 2010 Vocabulary List 1. Click and Type - A feature that allows you to double-click a blank area of a document to position the cursor in that location,
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.
MATLAB and SimulinkLecture 51 To days Outline Linear Equations ODE Integration Handle Graphics. Exercises on this days topics.
© 2011 Delmar, Cengage Learning Chapter 1 Getting to Know Illustrator.
Introduction to Matlab’s Graphical User Interface (GUI) Type “guide” “Guide” creates interface on a Figure window and code in an M-file. Some hidden code.
Graphical User Interfaces I The central station is the bubble gum planet with 280 pounds of clay and three head phone lines that come out and orbit the.
Introduction to MATLAB Damon Tomlin February 22, 2008 Lecture 3: Data Visualization & User Interfaces.
IC 3 BASICS, Internet and Computing Core Certification Key Applications Lesson 11 Organizing the Worksheet.
© 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Creating Charts Lecture 19.
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 , Chris Hill, Room ,
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
GUI development with Matlab: GUI Front Panel Components GUI development with Matlab: Other GUI Components 1 Other GUI components In this section, we will.
Chapter 8: Plotting. After completing this Chapter, you will be able to use the following features: Planning the Plot Sheet Plotting Environments Plotting.
Updated on: September 4, 2010 CIS67 Foundations for Creating Web Pages Professor Al Fichera.
Introduction to Drafting and Design In order to begin our drawing we have to set the drawing limits or the paper size.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
EGR 115 Introduction to Computing for Engineers
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
Adobe Photoshop T.Ahlam Algharasi. Adobe Photoshop Adobe Photoshop is a seriously powerful photo and image edit ( treating and manipulation, compositing,
Data Analysis GUI Documentation guide. Terminology GUI – Graphical User Interface Log-File – File containing data of interest which is generated by user’s.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
More Matlab Graphics and GUI Graphics subplots some useful commands 3D graphics GUI GUI controls The callback property Other essential properties.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Introducing Scratch Learning resources for the implementation of the scenario
Adobe Photoshop CS5.
Graphical User Interfaces I
Graphical User Interface in MATLAB
Chap 7. Building Java Graphical User Interfaces
Topics Graphical User Interfaces Using the tkinter Module
Presentation transcript:

Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room , Web page 11/02/ Lec 16

11/02/ Lec 162 Summary of last class Continued examining Matlab operations path and addpath commands Variables and constants IO using fopen, scanf etc. Formats Dialog boxes Much of the lecture is spent actually using these features in the M-files that are included with the lecture.

11/02/ Lec 163 Summary of Today’s class Examine graphic object handles and their use Look at graphics animation (example and needed for homework). Start the design process for a Matlab program to analyze GPS Time series results This lecture will be given partly by running Matlab and will look at the functions from Matlab that we could use.

11/02/ Lec 164 Graphic Objects in Matlab Matlab refers to components of a graphics object by handles (see Handle Graphics Objects Browser in main Matlab help)

11/02/ Lec 165 Basic functions of Graphics Handles Root: Top of hierarchy, corresponds to computer screen Figure: Windows on the root screen other command window (may be an actual figure but can also be a dialog/message/etc box) Axes: Objects that define a region of a figure and orient their children in this region Uicontrol: control objects that execute a function (pushbuttons, sliders etc) Uimenu: Interface menus that reside at the top of a figure (default is File Edit View etc) Uicontextmenu: Interface menus that appear when an object within axes is “right-clicked” (e.g., to change a line type) Matlab 7: Introduced uipanel for button panels and other user interface (ui) types such as uitoolbar, iucontainter, uitree, uitable.

11/02/ Lec 166 Graphics Handles Image: Objects of a rectangular array that are displayed with a color map Light: Object that defines light sources Line: primitive graphics on 2-D plots (includes marker) Patch: Filled polygons with edges Surface: three dimensional representations of matrix data created by plotting heights above the x-y plane Text: Character String objects.

11/02/ Lec 167 Graphics Handles The contents of current handles are obtained with the get command. The set command allows the object properties to be changed. Many of the options passed into e.g. the plot command are automatic ways of setting certain properties such as line type and color The root graphics handle is always 0 (try get(0) to see the properties of the root. For designing a GUI interface, the interactions between the objects need to carefully considered.

11/02/ Lec 168 Callbacks An important feature of the Matlab objects is their callback function. The callback defines the actions that are taken when an event occurs (such as a mouse click or window resize). If the callback function is simple (a single Matlab command) then it can be directly put into the callback properties More complex operations usually invoke a user defined function. Often this is one function which uses switch to test the case passed. This method is called switchyard programming. Call back of the form ‘mygui case’ is interpreted as call to mygui(‘case’); Complex call back can: mydata1, mydata2}); mygui(cbo, eventdata, mydata1, mydata2) is call created. (See uicontextmenu menu for example of changing line styles)

11/02/ Lec 169 Units Properties Getting the units properties correct is one the trickiest issues in designing interfaces The units property can take on the values of: pixels (default), points, inches, centimeters, normalized, characters (points and pixels are currently the same size since there are 72 of each to an inch) Two main issues occur here: –What will the interface look like on different sized monitors –What will happen if the figure is resized (e.g. axes units default to normalized so that they change size when the figure is scaled) –The ResizeFcn callback allows control over the actions when a resize happens Matlab help says units should always be changed back to default.

11/02/ Lec 1610 Position Property The Position property is measured from the lower left hand corner of the screen. Position is a four element array [Left Bottom width height] The problems with GUI’s during resize is the interpretation of the position property which sets position and size. If its units are non-normalized, then it will stay fixed (and possible be hidden by axes or move out of the figure) If its units are normalized, then text usually remains the same size and may not fit in box.

11/02/ Lec 1611 Example of setting properties In this example we set properties to show how an graphic can be animated. The Matlab/Lec03_movie.m and Matlab/per_func.m M- fles give an example of an animated sequence (the per_func defines how the object moves as a function of time).Matlab/Lec03_movie.mMatlab/per_func.m We will play with the erase mode: Choices are EraseMode {normal} | none | xor | background Normal is the slowest and most accurate

11/02/ Lec 1612 Time series program design Display GPS time series of North, East and Height positions in a way that problem in the data and analyzed and fixed. –The main features we would like are: Display of time series Remove linear and maybe other trends from the data Ability to mark times at which there are breaks in the time series Ability to record times at which there are bad data in the time series. The latter may be individual points or blocks of time. Concatenate files together (Pre- and post-earthquake times series

11/02/ Lec 1613 Functions that will be needed Most of this lecture will be spent using Matlab to look at the types of functions that will be needed for the task and how we go about finding these functions Some types of functions we will need: –Conversion of decimal year to yr month day –Selection of points on a plot –Fitting programs that will allow polynomials and other functions to be removed from data –Ability to compute statistics of a plot.

11/02/ Lec 1614 Graphical interface We would like to implement this system into a Graphical User Interface (GUI). This aspect will be treated in Matlab Lecture 4, but we will start on the process today. Basic process design: Desirable features in the interface –Selection of time series to display –Once it is displayed use call backs from the graphical interface to do such operations as: Detrend data Select portions of the data Zoom and pan image of data Display statistics of data

11/02/ Lec 1615 Functions needed for interface We now look at a series of functions and use Matlab to see how these functions operate datenum and associated functions – conversion of different date types std standard deviation of data ginput graphic coordinates polyfit fits polynomials to data polyval evaluates a polynomial logical sets a variable or array as logical which allows data selection Other functions that could be useful?

11/02/ Lec 1616 Implementation We will now look at these features in the GPSanal.m and gpsgui.m M-files. GPSanal.m defines all the graphics handles that we will need to access the information in graphics. This M-file was generated by the Matlab GUI tool guide Graphics Handles used are: –GCF : Graphics Current Figure –GCA: Graphics Current Axes –GCBO: Graphics Call Back Object –GCBF: Graphics Call Back Figure The example M-files will show how these are used.

11/02/ Lec 1617 Summary Examine graphic object handles and their use Look at graphics animation (example and needed for homework). Start the design process for a Matlab program to analyze GPS Time series results This lecture was be given using Matlab and we looked at the functions from Matlab that we could use.