Electrical and Computer Engineering Department SUNY – New Paltz

Slides:



Advertisements
Similar presentations
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.
Advertisements

CGS 1060 Introduction to MicroComputer Usage Chapter 1 Windows 7
1 How to create GUI's in MatLAB Rigo Dicochea. 2 Introduction Graphical User Interface (GUI) MatLab provides Graphical User Interface Development Environment(GUIDE)
ENGR 3 rocks. Desktop-->Classes-->Matlab-Engineering-- >matlab_using_engineering_toolkits.bat.
ArcView Documents Francisco Olivera, Ph.D., P.E. Department of Civil Engineering Texas A&M University.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
CS112 Scientific Computation Department of Computer Science Wellesley College Interactive Programs Graphical User Interfaces.
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.
Digital Image Processing Lecture3: Introduction to MATLAB.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
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.
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
Chapter 1 P. 1 Writing Windows applications with Visual Basic Figure 1.1 The first program works as follows: (These operations can be performed in any.
An Introduction to Visual Basic
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.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
IE 411/511: Visual Programming for Industrial Applications
HTML presentation Embedding Graphics in Web Pages n HTML uses an empty tag called the (image tag) n n n or n n n Note: all web production tools do insert.
Introduction to Matlab & Data Analysis
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.
General Computer Science for Engineers CISC 106 Lecture 11 James Atlas Computer and Information Sciences 07/27/2009.
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.
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.
function varargout = MovieJoiner(varargin) % MOVIEJOINER M-file for MovieJoiner.fig % MOVIEJOINER, by itself, creates a new MOVIEJOINER or raises the.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
Introduction to MATLAB Damon Tomlin February 22, 2008 Lecture 3: Data Visualization & User Interfaces.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
CC111 Lec7 : Visual Basic 1 Visual Basic(1) Lecture 7.
Chapter 2 – Introduction to the Visual Studio .NET IDE
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
3.9 to  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.
CSC 157 (Blum)1 Hello World. CSC 157 (Blum)2 Start/Programs/Microsoft Visual Studio.NET 2003/Microsoft Visual Studio.NET 2003.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 12”
Graphical User Interface Saint-Petersburg IT College Saint-Petersburg 2014.
CS112 Scientific Computation Department of Computer Science Wellesley College Interactive Programs Graphical User Interfaces.
EGR 115 Introduction to Computing for Engineers
Simulink by Dr. Amin Danial Asham. References  MATLAB Help  Telemark University College - Department of Electrical Engineering, Information Technology.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
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.
Lecture (7) Introduction to GUI Eng. Osama Talaat 1.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
PATTERN RECOGNITION LAB 8 TA : Nouf Al-Harbi::
SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 11”
Operating Systems Concepts 1/e Ruth Watson Chapter 1 Chapter 1 Introduction to Operating Systems Ruth Watson.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Lesson 1 – Getting Started with App Inventor
Graphical User Interface in MATLAB
Windows – File System There is a different file system for each hardware device The different file systems are identified at the root by an alpha character.
Chapter 2 – Introduction to the Visual Studio .NET IDE
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
1. Introduction to Visual Basic
More on Graphical User Interfaces
Social Media And Global Computing Introduction to Visual Studio
Understanding the Visual IDE
MATLAB GUI with GUIDE 報告人:張捷勝.
Embedding Graphics in Web Pages
Plotting Data with MATLAB
Digital Image Processing
The Basic Usage and The Event Handling in Glade.
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Electrical and Computer Engineering Department SUNY – New Paltz
Electrical and Computer Engineering Department SUNY – New Paltz
Presentation transcript:

Electrical and Computer Engineering Department SUNY – New Paltz Computer Simulation “Lecture 11” Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz

Analysis of GUI Objects mygui.m mygui.fig SUNY-New Paltz

Graphical User Interfaces (GUIs) Objectives • figure files; • application M-files; • callback functions. SUNY-New Paltz

Basic structure of a GUI GUIDE: Graphical User Interface Development Environment GUIDE: generates 2 files : FIG-file and application M-file SUNY-New Paltz

Basic structure of a GUI FIG-file contains a complete description of the GUI figure application M-file contains the functions required to launch and control the GUI. Callback functions, written by you, determine the action taken when you interact with a GUI component SUNY-New Paltz

GUIDE SUNY-New Paltz

Inspect Properties String property Tag property of the button is set to pushbutton1 Callback property myapp(’mybutton_Callback’,gcbo,[],guidata(gcbo)) SUNY-New Paltz

My First GUI! Click on the run arrow In ‘mygui1.m’ file in the editor window, Find function: pushbutton1_Callback(hObject, eventdata, handles) In that function, change the ‘String’ property of the object to ‘Hello GUI!’ by adding: set(hObject, ‘String’, ‘Hello GUI!’) set(handles.push_button1, ‘String’, ‘Hello GUI’) Run the program In Command Window: Type ‘guide’ Select ‘Create New Guide’ Call your fig file ‘mygui1.fig’ Adjust the window size to a smaller one Drag a ‘pushbutton’ to the center Double click on it and find ‘String’ property. Rename it ‘Click Me!’ SUNY-New Paltz

getting the time SUNY-New Paltz

One Object affecting the other Place 2 push buttons on the scree Clicking the LHS button should change the background color of the RHS button Green. Clicking the RHS button should clear(back to the default the Green color. Hint use : Set(handles.pushbutton2, ..) to address the RHS button from the LHS call-back. SUNY-New Paltz

Digital Clock SUNY-New Paltz

Matlab Code % get time d = clock; % convert time to string time = sprintf( ’%02.0f:%02.0f:%02.0f’,d(4),d(5),d(6)); % change the String property of pushbutton1 set(gcbo,’String’,time) SUNY-New Paltz

Square Root GUI SUNY-New Paltz

MATLAB Code function varargout = pushbutton1_Callback(h, eventdata, handles, varargin) % Stub for Callback of the uicontrol handles.pushbutton1. a = str2num(get(handles.edit1,’String’)); x = a; % initial guess for i = 1:8 x = (x + a/x)/2; str(i) = {sprintf(’%g’,x)}; end set(handles.edit1,’String’,’’); set(handles.text2,’String’,str) SUNY-New Paltz

Plotting in a GUI SUNY-New Paltz