Introduction to MATLAB Damon Tomlin February 22, 2008 Lecture 3: Data Visualization & User Interfaces.

Slides:



Advertisements
Similar presentations
Prof. Muhammad Saeed Mathematical Modeling and Simulation UsingMATLAB Graphic User Interface (GUI)Basics.
Advertisements

An Introduction to Visual Basic Terms & Concepts.
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.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
XP Exploring the Basics of Microsoft Windows XP1 Exploring the Basics of Windows XP.
1 How to create GUI's in MatLAB Rigo Dicochea. 2 Introduction Graphical User Interface (GUI) MatLab provides Graphical User Interface Development Environment(GUIDE)
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
3D Game Programming All in One By Kenneth C. Finney.
MATLAB Week 3 17 November Outline Graphics – Basic plotting – Editing plots from GUI – Editing plots from m-file – Advanced plotting commands.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 3 Tariq Aziz and Kevin Jones.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
Exploring the Basics of Windows XP
Visual Basic Chapter 1 Mr. Wangler.
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.
Chapter 5 Review: Plotting Introduction to MATLAB 7 Engineering 161.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
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)
Introduction to the Graphical User Interface (GUI) in MATLAB
Matlab GUIs GUIDE.
Chapter 8: Writing Graphical User Interfaces
ELG 3120 Signal and System Analysis 1 Introduction to MATLAB TAs Wei Zhang Ozgur Ekici (Section A)(Section B) ELG 3120 Lab Tutorial 1.
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 --
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
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.
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.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
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.
Graphical User Interfaces Tonga Institute of Higher Education.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
Copyright © Curt Hill More Components Varying the input of Dev-C++ Windows Programs.
Visual Basic Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
GUI development with Matlab: GUI Front Panel Components GUI development with Matlab: Other GUI Components 1 Other GUI components In this section, we will.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
EGR 115 Introduction to Computing for Engineers
INFORMATION SYSTEM – SOFTWARE TOPIC: GRAPHICAL USER INTERFACE.
CMPF124 Personal Productivity With Information Technology Chapter 1 – Part 2 Introduction to Windows Operating Systems Manipulating Windows GUI CMPF 124.
Graphic User Interface Review of Lecture 1 to Lecture 6 C.F. Lu.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
Introduction to Engineering MATLAB – 9 Plotting - 2 Agenda Formatting plots.
Project Planning Defining the project Software specification Development stages Software testing.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
PATTERN RECOGNITION LAB 8 TA : Nouf Al-Harbi::
More Matlab Graphics and GUI Graphics subplots some useful commands 3D graphics GUI GUI controls The callback property Other essential properties.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
Graphical User Interfaces I
Topics Graphical User Interfaces Using the tkinter Module
Graphical User Interface in MATLAB
Chapter Topics 15.1 Graphical User Interfaces
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming UTPA – Fall 2012 This set of slides is revised from lecture.
Chapter 8: Writing Graphical User Interfaces
An Introduction to Visual Basic
More on Graphical User Interfaces
The University of Texas – Pan American
Chapter 13 Sights and Sounds.
Topics Graphical User Interfaces Using the tkinter Module
Chapter 15: GUI Applications & Event-Driven Programming
Presentation transcript:

Introduction to MATLAB Damon Tomlin February 22, 2008 Lecture 3: Data Visualization & User Interfaces

A quick word about SPM... This can be a little intimidating...

“Any sufficiently advanced technology is indistinguishable from magic.” SPM is three things: – –Some functions that work on numbers (your data) – –Some functions that display the crunched numbers – –A bunch of buttons that run the functions when you press them -- Arthur C. Clarke, possibly describing SPM

Overview of MATLAB Graphics FiguresAxes UI Objects Handles –If you can see it, it has a handle. –Some things you can’t see have handles, too. –Use handles to manipulate properties.

Handles & Properties Figures, axes, and graphics have handles, just like files These objects have properties These properties can be altered

How many ways can we look at data? 2D line plots Pseudocolor Images Histograms 3D shapes

2D Plots plot(x,y); plot([x1 x2 x3],[y1 y2 y3]); plot(x1,y1,’r.’,x2,y2,’b-’);

Images imagesc –Pseudocolor –Colormaps image –M x N x 3 matrix

Histograms hist –designate bins bar –generic bar graph

3D Visualization Surface plots –Color –Transparency Mesh plots 3D shapes

Making Visualizations More Informative xlabel, ylabel, zlabel titlelegend

Other handy functions subplot(rows,columns,number) Axis([xmin xmax ymin max]) set(handle,’PropertyName’,value,...); get(handle,’PropertyName’)

What’s a Graphical User Interface? (GUI) Figure windows Buttons, menus, sliders, etc. Appearance changes depending on inputs & outputs Eliminates command line typing

Demystifying GUI’s Interface objects have properties –Style – type of object –String – text associated with object –Callback – what the object does –Value – current value of object What these properties mean depends on the type (Style) of object created

UI Styles: Buttons Buttons cause commands to be executed Style – pushbutton String – text on the button Callback – string containing command(s) executed by button Value – not important

The Eval Function Executes a string as though it were a command typed into a command window or function Example 1: eval(‘disp(a);’); Example 2: eval([‘save ‘ FileName ‘ a b;’]);

Callbacks and Eval Callbacks are assigned within functions Callbacks are executed outside functions –(usually) Therefore, any variables a callback needs have to be stored somehow.

UI Styles: Radio Buttons Style – radiobutton String – text on the button Value – whether button is pushed in or out Callback – exclusivity code & additional functions Used in sets for mutually exclusive, boolean options

UI Styles: Check Boxes Style – checkbox String – text on the box Value – whether button is checked Callback – often nothing, unless switching the option’s value executes a function Used for boolean options

UI Styles: Edit Windows Style – edit String – text in the box Value – not used Callback – function executed when Enter key is pressed Used for typed inputs of names & values

UI Styles: Slider Bars Style – slider String – not used Value – position of slider – between Max and Min Callback – function executed when slider is moved Used when a variable can take on a spectrum of values

UI Styles: Text Boxes Style – text String – text in the box Value – not used Callback – not used Used for displaying information, entitling portions of a GUI

UI Styles: Frames Style – Frame String – not used Value – not used Callback – not used Used for grouping other objects visually

UI Styles: List Boxes Style – listbox String – cell array of each possible choice Value – currently highlighted selection Callback – function executed when an item is selected Used for selecting options when their names and numbers may change

UI Styles: Pop Up Menus Style – popupmenu String – cell array of each possible choice Value – currently selected option Callback – function executed when an item is selected Used for selecting options in a more compact manner

Useful Functions set – change something’s properties get – find out what something’s properties guidata – attach data to/pull data from GUI

Summary MATLAB has lots of functions to help you look at your data You can connect functions to GUI’s so you don’t have to type as much As we’ll see, this is exactly what SPM does.