Introduction To MATLAB Interactive Graphics

Size: px
Start display at page:

Download "Introduction To MATLAB Interactive Graphics"

Transcription

1 Introduction To MATLAB Interactive Graphics Eric Peasley, Department of Engineering Science, University of Oxford version 3.0, 2017

2

3 An Introduction to MATLAB Interactive Graphics Table of Contents Data Types...2 Strings...2 Cell Array...4 Structures...6 Flow Control...7 Switch...7 Try Catch...8 Global Variables...8 Handle Graphics...9 Types of Graphic Object...9 Object Creation...11 Changing Object Properties...13 Other Handle Graphics Functions...13 Predefined Dialogue Boxes...14 Guide...15 Version 3.0 1

4 Data Types Strings A string is a data type that holds a piece of text. To create a string, place the text between single quotes. Mystring='Hello World' Strings are arrays of characters. So you can concatenate them together just like you would concatenate two arrays. S1 = 'Hello' S2 = 'World' S = [S1 ' ' S2] String Comparison The function strcmp compares two strings strcmp(mystring,'hello world') %Compare two strings The result is either true or false. The case above will be false because of the capital letters in the original string. There is a case insensitive version that will give true. strcmpi(mystring,'hello world') %Case insensitive version The function can be used as the conditional part of a while loop or if statement. There are several other functions that can be used to compare two strings. To find out more, enter doc string comparisons in the MATLAB command window. 2

5 Converting Numbers into Strings There are several functions to convert numbers into strings. The most basic one is num2str. S = num2str(pi) % converts pi into a string S = num2str(pi,'%0.1f') % fixed point to one decimal place S = num2str(pi,'%0.2e') % exponential notation, 2 decimal place S = num2str(11,'%x') % present as a hexadecimal number Anybody that has used the C programming language will recognize the format strings as being the same as used by the fprinf and sprintf functions. These functions are also available within MATLAB. S = sprintf('hexadecimal %x \nand fixed point %0.1f ',11,pi) %x A hexadecimal number should be inserted here. \n Start a new line of text. %0.1f Insert a fixed point number with just one decimal place. The two end arguments contain the numbers to be inserted. So this produces S = 'hexadecimal b and fixed point 3.1 ' You will find much more information about formatting with sprintf in the MATLAB documentation. doc sprintf Converting Strings into Numbers There is also a function for converting a string into a number. N = str2double('3.142') %Convert a string into a number Evaluate a string as MATLAB code You can also use a string as a command to MATLAB s1 = 'sqrt(9)' A = eval(s1) % String containing the MATLAB statement % execute the MATLAB statement in s1 3

6 Cell Array Cell arrays are very similar to standard arrays and matrices, except that each of the elements is a cell that can hold data of different size and type. So for example, the first cell could be a string, the second could be a number etc. Elements of a standard array have to be of the same size and type. Cell arrays can be created in the same manner as matrices, except that you use curly brackets instead of square brackets. C = {'Time' 'Disturbance' ; 1:200 rand(1,200)} This produces a 2 by 2 cell array. The top two cells contain strings, the bottom two contain vectors. Cells can also contain other cell arrays and structures. Cell arrays can also be created by using indexing. MyCell{1} = 'Blue' MyCell{2} = 'Red' MyCell{3} = 'Green' MyCell is a 1 by 3 cell array. Each cell contains a string. Contents Indexing Indexing using curly brackets refers to the content of cells. A = C{1,1} Here the contents of a particular cell is extracted and placed into the variable A. If you want to extract the contents of several cells into variables at once, you need to provide a variable name for the contents of each cell. [string1,matrix1] = C{[1 2],1} The contents of the first two cells in column one of the cell array is extracted. The first item is placed in variable string1, the second is placed into matrix1. Cell Indexing Instead of extracting the contents of cells, you may want to create a sub cell array containing just the specified cells. Indexing using round brackets refers to the cells themselves. NewCell = C([1 2],1) This creates a new cell array containing the first two cells in column one of C. You can write to multiple cells in one line. MyCell(4:6) = {'Cyan' 'Magenta' 'Yellow'} Adds three more colours to the cell array MyCell. 4

7 Cell Concatenation Suppose that you create two 2 by 1 cell arrays. c1 = {'one'; 1} c2 = {'two'; 2} There are two ways that you can merge the two cells into a single cell array. c3a = {c1 c2} Here c3a is a 1 by 2 cell array. Each cell contains one of the original 2 by 1 cell arrays. c3b = [c1 c2] in this case c3b is a 2 by 2 cell array. The two cell arrays have been concatenated into one cell array. An easy way to look at the content of a cell array is to double click on the variable in the Workspace window on the right of the Command Window. This opens the variable in the Variable Editor. 5

8 Structures A structure is like a cell array, but instead of using a number to refer to individual items, the items are given names. For example, suppose that we want to keep information about a chemical element. We could use a cell array. E{1} = 'Sodium'; E{2} = 'Na'; E{3} = 11 %Name %Symbol %Atomic Number However, we would have to remember that the Name is in the first element and the Symbol is in the second element etc. If we use a structure instead, then all this information is far more obvious. Chem.Name = 'Sodium'; Chem.Symbol = 'Na'; Chem.Atomic = 11 Each item in a structure is called a field. To access an individual field you use the name of the structure and the name of the field separated by a full stop. A field can contain a number, a string, an array, a cell array, or another structure. Dynamic Field Names You can use a variable to specify which field you want. For example : S = 'Atomic'; AN = Chem.(S) If we just enter Chem.S, then MATLAB would look for a field called S in the structure. By placing brackets around the variable S, the contents of brackets are evaluated before being used as a field name. The code below shows how to use this feature to access a structure in a for loop. C = {'Name' 'Symbol' 'Atomic'}; % Cell of field names for k = 1:3 FieldName = C{k}; % extract field name from cell array Field = Chem.(FieldName); % extract field from structure disp(field); % display contents of field. end 6

9 Flow Control Switch A switch statement uses the value of a variable to selects which code to execute. For example switch(daynumber) case 1 Day = 'Monday'; case 2 Day = 'Tuesday'; case 3 Day = 'Wednesday'; case 4 Day = 'Thursday'; case 5 Day = 'Friday'; case 6 Day = 'Saturday'; case 7 Day = 'Sunday'; otherwise Day = []; errordlg('invalid day number') end If DayNumber is 1, Day is set to Monday, if DayNumber is 2, Day is set to Tuesday etc. If Daynumber is not in the range 1 to 7, then the statements after otherwise are executed. You can put several lines of code for each case if required. You can also execute the same code for several different numbers. For example switch(daynumber) case{1,2,3,4,5} DayType = 'Week Day'; case{6,7} DayType = 'Weekend'; end 7

10 Try Catch Try and catch are used for error recovery. Interactive programs can generate errors because the user makes a mistake. The aim is to catch those errors and do something sensible, rather than crash the program. You place the vulnerable code in the try part and then the catch part will only execute if an error occurs in the try part. For example x = linspace(-1,1,100); % Generate x at 100 points try A = inputdlg('enter an expression: '); %Ask for an expression y = eval(a{1}); %Evaluate expression plot(x,y) catch err errordlg(err.message) %Error dialogue box end In the try part the program tries to plot an expression entered by the user. It is quite possible that the user will enter an invalid expression and cause an error. If an error does occur, the the program will immediately jump to the catch part. The variable called err, is a structure containing information about the error that has occurred. A field called message in this structure contains the error message. This is displayed in an error dialogue box. Global Variables When you write a MATLAB function, any variables within the function are local to that function. This means that they can only be used within the function itself and cannot be accessed in any other function or the command window. Global variables can be be accessed in several functions and the command window. To make a variable global, you declare that it is global at the top of your function. global a b c You must declare a variable as global in every function where you want to use it. This also applies to the command window. You will not be able to see any global variables within the command window until you declare the variable as global within the command window. Any declaration of global variables within a function must be at the beginning of the function. 8

11 Handle Graphics Sometimes you need to produce graphics that are different or more complex than the graphs obtained by the standard plot functions. When you use the plot function in MATLAB, the graphics produced are composed of simpler graphic objects. You can compose your own graphics using these objects in what ever way you wish. Every graphical object has a extensive selection of properties that can be configured to your own requirements. To access these properties you use the objects handle. A graphics handle is structure allocated to each object. The structure has a field for each property. Types of Graphic Object. There is a hierarchy of graphical objects within MATLAB. Root Figures Axes Ui Objects Plot Objects Primitive Objects Root At the top is the root, which is not really a graphics object at all. It is just a starting point for everything else. The root also has properties that are inherited by its children below. The function groot returns the handle of the root. Figures Figures are the windows that contain the graphics. Axes An axes is like the paper that a graph is plotted onto. There can be several axes in a figure. Each axes in a figure is a child of the figure and the figure is a parent of the axes. 9

12 UI Objects The other type of object that you can put directly into a figure are the User Interface (UI) objects such as push buttons, sliders and check boxes. Plot Objects Plot objects are the 2D graphs produced by plot, bar, semilog and the 3D graphs produced by surf, mesh and plot3 etc. Primitive Objects Then there are the low level graphical objects such as lines, text, rectangles and patches. A patch is a n sided shape, defined by the coordinates of the corners. These are all children of an axes. Example of a MATLAB figure 10

13 Object Creation There is a function for each type of object that will create that particular object. For example hf = figure Will create a figure and the variable hf will contain the handle of the figure. At the same time as you create a figure, you can set object properties. hf = figure('position',[100,100,500,500]) Which will create a 500 by 500 pixel figure, 100 pixels from the bottom and left of the screen. Although there are many different object creation functions, they are all similar in the way that you use them. In the general form of the function, you specify the name of the property and then the value you want to assign to the property, this is known as name-value pairs. You can put in as many name-value pairs as you like. There are two in the example below. hf = figure('position',[100,100,500,500],'color',[.2,.8,.8]) MATLAB is an American program, so you need to use color, the American spelling. If you change more than two properties, the statements lines can get very long. The normal practice is to split the statement over several lines using ellipses(...), so that there is one property per line. hf = figure('position',[100,100,500,500],... 'Color',[.2,.8,.8],... 'Resize','off') Property Inspector A figure has over sixty different properties. Other objects have a similar amount. So it is fairly unlikely that you will remember the names of all the properties and how to use them. The properties of each type of object are listed in the MATLAB online documentation. To see the documentation on the figure properties, enter into the MATLAB command window doc figure properties This is a very extensive document. It is much easier to use the property inspector to find out about an objects properties. In the command window enter inspect(h) where h is the handle of the object. This will list all the properties of the object and there current value. You can use the inspector to change the value of a property. You can also use the inspector to find the online help for that property. Right click on the property and select What's This? This will take you directly to the description of the property in the online documentation. 11

14 Current Figure When you create an axes, it is put into the current figure. MATLAB keeps the handle of the current figure. If you create a new figure, that becomes the current figure. You can change the current figure using the figure function. figure(hf) ha = axes; % Change current figure to hf % Create a new axes in hf with handle ha. You can also find the handle of the current figure with the the function gcf. hcf = gcf; % Get current figure If no figure exists when you create an axes, a figure will automatically be created and become the current figure. If you click on a figure, then that becomes the current figure. Current Axes The current axes is similar to the current figure. If you create an object that needs to be within an axes, it is put into the current axes. The current axes is the last axes created or you can switch the current axes using the axes function. axes(ha) gca % Change current axes to ha % Get handle of current axes You can also select a different current axes by clicking on an axes. Simplified Calling Syntax To make things easier to use, some functions have a simplified form. For example, to write the text Hello world on an axes at positions (0.5, 0.5), I could use text('position',[ ],'String','Hello') However, in practice you will always want to specify the string and the position. So there is a simper way of doing this. text(0.5,0.5,'hello There') Other functions have to be entered in a simpler form. For example, you would not want to enter a plot function in this form. plot('xdata',x,'ydata',y,'color','r') % does not work However, the plot functions does create a graphical object, so it does have a handle, and you can use property value pairs. hp = plot(x,y,'r','linewidth',2) 12

15 Changing Object Properties There are a number of ways to change the properties after it has been created. The original method used the function get to find a properties value and the function set to change the value. lw = get(hp,'linewidth') %Read line width of plot with handle hp set(hp,'linewidth',3) %Set line width of plot with handle hp Since MATLAB release R2014b, object handles are structures. So you no longer need to use the set and get functions to change object properties. The modern equivalent to the above is lw = hp.linewidth hp.linewidth = 3 Here are more examples figcolour = hf.color hf.color = 'w' %Read the colour of figure hf %Set the colour of figure hf to white Unfortunately, gcf is a function and not a structure. You can use gcf in get and set but you cannot use the structure notation. get(gcf,'color') get(gcf) set(gcf,'color','g') %Display colour of the current figure %Display all proprieties of the figure %Set the colour of the current figure Other Handle Graphics Functions ishandle(h) %Test if h is a graphics handle Returns true if h is the handle of a graphical object. Can be used in the condition part of if and while. cla cla(ha) clf clf(hf) delete(h) %clear current axes %clear axes with handle ha %clear current figure %clear figure hf %Delete object with handle h 13

16 Predefined Dialogue Boxes Often when you are developing a Graphical User Interface, you want to bring up a small window to display a message, ask for some input or the name of a file. You could write your own program to do this. However, MATLAB includes many different types of dialogue boxes ready for you to use. To see how these work, try the following. msgbox('hello World') msgbox('hello World','My Title') a = questdlg('are you happy') There are many other types of predefine dialogue boxes. To see the full list, look in the MATLAB documentation. doc Dialog Boxes You will use several different predefine dialogue boxes in the exercises. 14

17 Guide Guide is a Computer Aided Design tool for MATLAB Graphical User Interfaces. It allows you to select different types of graphic objects and drag them into position on to a figure. The example below show a guide window containing a design for a temperature conversion GUI. This GUI uses two types of objects. The white boxes are Edit Text objects. Users can type into an edit text box. The words are Static Text objects. You can change the properties of an object by double clicking on an object. This opens the properties inspector. The callback function properties are important. They define the function that runs when you interact with an object. For example, when you enter text into a Edit Text box, a callback function is run. Guide will automatically set the name of the callback function for each of the interactive objects using the objects Tag property. You can change the Tag. 15

18 When you save your design, it is stored into a.fig file. At the same time, the associated.m file, the MATLAB program for the GUI is created and opened in the MATLAB editor. The program consists of the callback functions required to interact with the GUI. For example, the Temperature Converter GUI is called tconv for short. The design is saved into tconv.fig and the program is called tconv.m. The Tag property for the Celsius and Fahrenheit edit boxes has been changed to editc and editf respectively. The program tconv.m contains 7 functions. The top function is tconv() itself. You normally do not change the top level function. Then there are 2 functions for the figure and another 2 functions for each of the Edit Texts. function tconv_openingfcn(hobject, eventdata, handles, varargin) function varargout = tconv_outputfcn(hobject, eventdata, handles) function editc_callback(hobject, eventdata, handles) function editc_createfcn(hobject, eventdata, handles) function editf_callback(hobject, eventdata, handles) function editf_createfcn(hobject, eventdata, handles) In general, a GUI will have these types of function. OpeningFcn OutputFcn Callback CreateFcn This is called just before the GUI opens. This is used for returning data from the application. Executes when the user interacts with the object. e.g. Clicks on a button, moves a slider or enters text into an edit text. Executes when the object is created. Callback functions have a special form, with specific inputs. The two inputs that you need to use are :- hobject handles The handle of the object associated with the function. A structure containing the handles of all the objects in the GUI. The field name of each handle is the same as the Tag. You can add your own fields to the handles structure for your own data. Between functions calls, the handles structure is stored in the data property of the GUI's figure. So if you change the data in handles, you need to write the structure back into the data store, using the function guidata. For example. guidata(handles.figure1,handles); 16

19 For the Temperature Converter, the structure handles contains the following. Field Name figure1 editf editc text3 text2 text1 Output Description The figure handle The Fahrenheit Edit Text handle The Celsius Edit Text handle The handle of the static text Temperature Converter The handle of the static text Fahrenheit The handle of the static text Celsius What the GUI will return To get the program to work, you then insert your own code into the functions. To complete the Temperature Converter GUI, you would just add the following to the end of the function editc_callback. str = get(hobject,'string'); C = str2double(str); F = C*9/5+32; str = num2str(f); set(handles.editf,'string',str); % Get string from C Edit Text % Convert string to number % Convert Celsius to Fahrenheit % Convert number to string % Write str to F Edit Text. and then add the following to the end of the function editf_callback. str = get(hobject,'string'); F = str2double(str); C = (F-32)*5/9; str = num2str(c); set(handles.editc,'string',str); % Get string from F Edit Text % Convert string to number % Convert Fahrenheit to Celsius % Convert number to string % Write str to C Edit Text. 17

INTRODUCTION TO MATLAB INTERACTIVE GRAPHICS EXERCISES

INTRODUCTION TO MATLAB INTERACTIVE GRAPHICS EXERCISES INTRODUCTION TO MATLAB INTERACTIVE GRAPHICS EXERCISES Eric Peasley, Department of Engineering Science, University of Oxford version 3.0, 2017 MATLAB Interactive Graphics Exercises In these exercises you

More information

INTRODUCTION TO THE MATLAB APPLICATION DESIGNER EXERCISES

INTRODUCTION TO THE MATLAB APPLICATION DESIGNER EXERCISES INTRODUCTION TO THE MATLAB APPLICATION DESIGNER EXERCISES Eric Peasley, Department of Engineering Science, University of Oxford version 4.6, 2018 MATLAB Application Exercises In these exercises you will

More information

QUICK INTRODUCTION TO MATLAB PART I

QUICK INTRODUCTION TO MATLAB PART I QUICK INTRODUCTION TO MATLAB PART I Department of Mathematics University of Colorado at Colorado Springs General Remarks This worksheet is designed for use with MATLAB version 6.5 or later. Once you have

More information

There are two ways to launch Graphical User Interface (GUI). You can either

There are two ways to launch Graphical User Interface (GUI). You can either How to get started? There are two ways to launch Graphical User Interface (GUI). You can either 1. Click on the Guide icon 2. Type guide at the prompt Just follow the instruction below: To start GUI we

More information

12 whereas if I terminate the expression with a semicolon, the printed output is suppressed.

12 whereas if I terminate the expression with a semicolon, the printed output is suppressed. Example 4 Printing and Plotting Matlab provides numerous print and plot options. This example illustrates the basics and provides enough detail that you can use it for typical classroom work and assignments.

More information

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

Appendix A. Introduction to MATLAB. A.1 What Is MATLAB? Appendix A Introduction to MATLAB A.1 What Is MATLAB? MATLAB is a technical computing environment developed by The Math- Works, Inc. for computation and data visualization. It is both an interactive system

More information

Special Topics II: Graphical User Interfaces (GUIs)

Special Topics II: Graphical User Interfaces (GUIs) Special Topics II: Graphical User Interfaces (GUIs) December 8, 2011 Structures Structures (structs, for short) are a way of managing and storing data in most programming languages, including MATLAB. Assuming

More information

PART 1 PROGRAMMING WITH MATHLAB

PART 1 PROGRAMMING WITH MATHLAB PART 1 PROGRAMMING WITH MATHLAB Presenter: Dr. Zalilah Sharer 2018 School of Chemical and Energy Engineering Universiti Teknologi Malaysia 23 September 2018 Programming with MATHLAB MATLAB Environment

More information

Computational Methods of Scientific Programming. Matlab Lecture 3 Lecturers Thomas A Herring Chris Hill

Computational Methods of Scientific Programming. Matlab Lecture 3 Lecturers Thomas A Herring Chris Hill 12.010 Computational Methods of Scientific Programming Matlab Lecture 3 Lecturers Thomas A Herring Chris Hill Summary of last class Continued examining Matlab operations path and addpath commands Variables

More information

Building a Graphical User Interface

Building a Graphical User Interface 148 CHAPTER 9 Building a Graphical User Interface Building a Graphical User Interface CHAPTER 9 9.1 Getting started with GUIDE 9.2 Starting an action with a GUI element 9.3 Communicating with GUI elements

More information

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester Programming Language Control Structures: Selection (switch) Eng. Anis Nazer First Semester 2018-2019 Multiple selection choose one of two things if/else choose one from many things multiple selection using

More information

Constraint-based Metabolic Reconstructions & Analysis H. Scott Hinton. Matlab Tutorial. Lesson: Matlab Tutorial

Constraint-based Metabolic Reconstructions & Analysis H. Scott Hinton. Matlab Tutorial. Lesson: Matlab Tutorial 1 Matlab Tutorial 2 Lecture Learning Objectives Each student should be able to: Describe the Matlab desktop Explain the basic use of Matlab variables Explain the basic use of Matlab scripts Explain the

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 2 Basic MATLAB Operation Dr Richard Greenaway 2 Basic MATLAB Operation 2.1 Overview 2.1.1 The Command Line In this Workshop you will learn how

More information

Programming 1. Script files. help cd Example:

Programming 1. Script files. help cd Example: Programming Until now we worked with Matlab interactively, executing simple statements line by line, often reentering the same sequences of commands. Alternatively, we can store the Matlab input commands

More information

Still More About Matlab GUI s (v. 1.3) Popup Menus. Popup Menu Exercise. Still More GUI Info - GE /29/2012. Copyright C. S. Tritt, Ph.D.

Still More About Matlab GUI s (v. 1.3) Popup Menus. Popup Menu Exercise. Still More GUI Info - GE /29/2012. Copyright C. S. Tritt, Ph.D. Still More About Matlab GUI s (v. 1.3) Dr. C. S. Tritt with slides from Dr. J. LaMack January 24, 2012 Popup Menus User selects one from a mutually exclusive list of options The String property is typically

More information

Signal and Systems. Matlab GUI based analysis. XpertSolver.com

Signal and Systems. Matlab GUI based analysis. XpertSolver.com Signal and Systems Matlab GUI based analysis Description: This Signal and Systems based Project takes a sound file in.wav format and performed a detailed analysis, as well as filtering of the signal. The

More information

Computational Methods of Scientific Programming

Computational Methods of Scientific Programming 12.010 Computational Methods of Scientific Programming Lecturers Thomas A Herring, Jim Elliot, Chris Hill, Summary of last class Continued examining Matlab operations path and addpath commands Variables

More information

Basic Computer Programming (Processing)

Basic Computer Programming (Processing) Contents 1. Basic Concepts (Page 2) 2. Processing (Page 2) 3. Statements and Comments (Page 6) 4. Variables (Page 7) 5. Setup and Draw (Page 8) 6. Data Types (Page 9) 7. Mouse Function (Page 10) 8. Keyboard

More information

MATLAB Introduction to MATLAB Programming

MATLAB Introduction to MATLAB Programming MATLAB Introduction to MATLAB Programming MATLAB Scripts So far we have typed all the commands in the Command Window which were executed when we hit Enter. Although every MATLAB command can be executed

More information

Lecture 1: Hello, MATLAB!

Lecture 1: Hello, MATLAB! Lecture 1: Hello, MATLAB! Math 98, Spring 2018 Math 98, Spring 2018 Lecture 1: Hello, MATLAB! 1 / 21 Syllabus Instructor: Eric Hallman Class Website: https://math.berkeley.edu/~ehallman/98-fa18/ Login:!cmfmath98

More information

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment

More information

MATLAB Project: Getting Started with MATLAB

MATLAB Project: Getting Started with MATLAB Name Purpose: To learn to create matrices and use various MATLAB commands for reference later MATLAB built-in functions used: [ ] : ; + - * ^, size, help, format, eye, zeros, ones, diag, rand, round, cos,

More information

ECE Lesson Plan - Class 1 Fall, 2001

ECE Lesson Plan - Class 1 Fall, 2001 ECE 201 - Lesson Plan - Class 1 Fall, 2001 Software Development Philosophy Matrix-based numeric computation - MATrix LABoratory High-level programming language - Programming data type specification not

More information

1. Register an account on: using your Oxford address

1. Register an account on:   using your Oxford  address 1P10a MATLAB 1.1 Introduction MATLAB stands for Matrix Laboratories. It is a tool that provides a graphical interface for numerical and symbolic computation along with a number of data analysis, simulation

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

Introduction to Scientific Computing with Matlab

Introduction to Scientific Computing with Matlab UNIVERSITY OF WATERLOO Introduction to Scientific Computing with Matlab SAW Training Course R. William Lewis Computing Consultant Client Services Information Systems & Technology 2007 Table of Contents

More information

Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python.

Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python. Raspberry Pi Learning Resources Turtle Snowflakes Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python. How to draw with Python Turtle 1. To begin, you will

More information

Lecture 12. Data Types and Strings

Lecture 12. Data Types and Strings Lecture 12 Data Types and Strings Class v. Object A Class represents the generic description of a type. An Object represents a specific instance of the type. Video Game=>Class, WoW=>Instance Members of

More information

MATLAB Project: Getting Started with MATLAB

MATLAB Project: Getting Started with MATLAB Name Purpose: To learn to create matrices and use various MATLAB commands for reference later MATLAB functions used: [ ] : ; + - * ^, size, help, format, eye, zeros, ones, diag, rand, round, cos, sin,

More information

Digital Media. Seasons Assignment. 1. Copy and open the file seasonsbegin.fla from the Read folder.

Digital Media. Seasons Assignment. 1. Copy and open the file seasonsbegin.fla from the Read folder. Digital Media Seasons Assignment 1. Copy and open the file seasonsbegin.fla from the Read folder. 2. Make a new layer for buttons. Create a button that the user will click to start the interaction. (Be

More information

Data Types and Variables in C language

Data Types and Variables in C language Data Types and Variables in C language Basic structure of C programming To write a C program, we first create functions and then put them together. A C program may contain one or more sections. They are

More information

MATH (CRN 13695) Lab 1: Basics for Linear Algebra and Matlab

MATH (CRN 13695) Lab 1: Basics for Linear Algebra and Matlab MATH 495.3 (CRN 13695) Lab 1: Basics for Linear Algebra and Matlab Below is a screen similar to what you should see when you open Matlab. The command window is the large box to the right containing the

More information

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02 Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02 Hello, in this lecture we will learn about some fundamentals concepts of java.

More information

AQA Decision 1 Algorithms. Section 1: Communicating an algorithm

AQA Decision 1 Algorithms. Section 1: Communicating an algorithm AQA Decision 1 Algorithms Section 1: Communicating an algorithm Notes and Examples These notes contain subsections on Flow charts Pseudo code Loops in algorithms Programs for the TI-83 graphical calculator

More information

% Edit the above text to modify the response to help Video_Player. % Last Modified by GUIDE v May :38:12

% Edit the above text to modify the response to help Video_Player. % Last Modified by GUIDE v May :38:12 FILE NAME: Video_Player DESCRIPTION: Video Player Name Date Reason Sahariyaz 28-May-2015 Basic GUI concepts function varargout = Video_Player(varargin) VIDEO_PLAYER MATLAB code for Video_Player.fig VIDEO_PLAYER,

More information

7 HANDLE GRAPHICS IN THIS CHAPTER 7.1 GRAPHICS OBJECTS 7.2 GRAPHICS OBJECTS HIERARCHY 7.3 GRAPHICS OBJECTS HANDLES 7.4 PROPERTIES 7.

7 HANDLE GRAPHICS IN THIS CHAPTER 7.1 GRAPHICS OBJECTS 7.2 GRAPHICS OBJECTS HIERARCHY 7.3 GRAPHICS OBJECTS HANDLES 7.4 PROPERTIES 7. 7 HANDLE GRAPHICS IN THIS CHAPTER 7.1 GRAPHICS OBJECTS 7.2 GRAPHICS OBJECTS HIERARCHY 7.3 GRAPHICS OBJECTS HANDLES 7.4 PROPERTIES 7.5 OBJECT SPECIFIC PROPERTIES 7.6 SETTING DEFAULT PROPERTIES 7.7 UNDOCUMENTED

More information

CISC 1600 Lecture 3.1 Introduction to Processing

CISC 1600 Lecture 3.1 Introduction to Processing CISC 1600 Lecture 3.1 Introduction to Processing Topics: Example sketches Drawing functions in Processing Colors in Processing General Processing syntax Processing is for sketching Designed to allow artists

More information

CISC-124. Dog.java looks like this. I have added some explanatory comments in the code, and more explanation after the code listing.

CISC-124. Dog.java looks like this. I have added some explanatory comments in the code, and more explanation after the code listing. CISC-124 20180115 20180116 20180118 We continued our introductory exploration of Java and object-oriented programming by looking at a program that uses two classes. We created a Java file Dog.java and

More information

Part #10. AE0B17MTB Matlab. Miloslav Čapek Viktor Adler, Pavel Valtr, Filip Kozák

Part #10. AE0B17MTB Matlab. Miloslav Čapek Viktor Adler, Pavel Valtr, Filip Kozák AE0B17MTB Matlab Part #10 Miloslav Čapek miloslav.capek@fel.cvut.cz Viktor Adler, Pavel Valtr, Filip Kozák Department of Electromagnetic Field B2-634, Prague Learning how to GUI #2 user? GUI function3

More information

Expressions and Variables

Expressions and Variables Expressions and Variables Expressions print(expression) An expression is evaluated to give a value. For example: 2 + 9-6 Evaluates to: 5 Data Types Integers 1, 2, 3, 42, 100, -5 Floating points 2.5, 7.0,

More information

Introduction to MATLAB

Introduction to MATLAB Quick Start Tutorial Introduction to MATLAB Hans-Petter Halvorsen, M.Sc. What is MATLAB? MATLAB is a tool for technical computing, computation and visualization in an integrated environment. MATLAB is

More information

SPARK-PL: Introduction

SPARK-PL: Introduction Alexey Solovyev Abstract All basic elements of SPARK-PL are introduced. Table of Contents 1. Introduction to SPARK-PL... 1 2. Alphabet of SPARK-PL... 3 3. Types and variables... 3 4. SPARK-PL basic commands...

More information

Your First Windows Form

Your First Windows Form Your First Windows Form From now on, we re going to be creating Windows Forms Applications, rather than Console Applications. Windows Forms Applications make use of something called a Form. The Form is

More information

Introduction to MATLAB Programming. Chapter 3. Linguaggio Programmazione Matlab-Simulink (2017/2018)

Introduction to MATLAB Programming. Chapter 3. Linguaggio Programmazione Matlab-Simulink (2017/2018) Introduction to MATLAB Programming Chapter 3 Linguaggio Programmazione Matlab-Simulink (2017/2018) Algorithms An algorithm is the sequence of steps needed to solve a problem Top-down design approach to

More information

The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development

The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Chapter 7 Graphics Learning outcomes Label your plots Create different

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB --------------------------------------------------------------------------------- Getting MATLAB to Run Programming The Command Prompt Simple Expressions Variables Referencing Matrix

More information

Arrays. Array Basics. Chapter 8 Spring 2017, CSUS. Chapter 8.1

Arrays. Array Basics. Chapter 8 Spring 2017, CSUS. Chapter 8.1 Arrays Chapter 8 Spring 2017, CSUS Array Basics Chapter 8.1 1 Array Basics Normally, variables only have one piece of data associated with them An array allows you to store a group of items of the same

More information

SBT 645 Introduction to Scientific Computing in Sports Science #5

SBT 645 Introduction to Scientific Computing in Sports Science #5 SBT 645 Introduction to Scientific Computing in Sports Science #5 SERDAR ARITAN serdar.aritan@hacettepe.edu.tr Biyomekanik Araştırma Grubu www.biomech.hacettepe.edu.tr Spor Bilimleri Fakültesi www.sbt.hacettepe.edu.tr

More information

BUILDING A MATLAB GUI. Education Transfer Plan Seyyed Khandani, Ph.D. IISME 2014

BUILDING A MATLAB GUI. Education Transfer Plan Seyyed Khandani, Ph.D. IISME 2014 BUILDING A MATLAB GUI Education Transfer Plan Seyyed Khandani, Ph.D. IISME 2014 Graphical User Interface (GUI) A GUI is useful for presenting your final software. It makes adjusting parameters and visualizing

More information

MATLAB Second Seminar

MATLAB Second Seminar MATLAB Second Seminar Previous lesson Last lesson We learnt how to: Interact with MATLAB in the MATLAB command window by typing commands at the command prompt. Define and use variables. Plot graphs It

More information

Enumerated Types. CSE 114, Computer Science 1 Stony Brook University

Enumerated Types. CSE 114, Computer Science 1 Stony Brook University Enumerated Types CSE 114, Computer Science 1 Stony Brook University http://www.cs.stonybrook.edu/~cse114 1 Enumerated Types An enumerated type defines a list of enumerated values Each value is an identifier

More information

How to succeed in Math 365

How to succeed in Math 365 Table of Contents Introduction... 1 Tip #1 : Physical constants... 1 Tip #2 : Formatting output... 3 Tip #3 : Line continuation '...'... 3 Tip #4 : Typeset any explanatory text... 4 Tip #5 : Don't cut

More information

Step by step set of instructions to accomplish a task or solve a problem

Step by step set of instructions to accomplish a task or solve a problem Step by step set of instructions to accomplish a task or solve a problem Algorithm to sum a list of numbers: Start a Sum at 0 For each number in the list: Add the current sum to the next number Make the

More information

LAB 1 General MATLAB Information 1

LAB 1 General MATLAB Information 1 LAB 1 General MATLAB Information 1 General: To enter a matrix: > type the entries between square brackets, [...] > enter it by rows with elements separated by a space or comma > rows are terminated by

More information

Introduction to Matlab. By: Hossein Hamooni Fall 2014

Introduction to Matlab. By: Hossein Hamooni Fall 2014 Introduction to Matlab By: Hossein Hamooni Fall 2014 Why Matlab? Data analytics task Large data processing Multi-platform, Multi Format data importing Graphing Modeling Lots of built-in functions for rapid

More information

CS 105 Lab As a review of what we did last week a. What are two ways in which the Python shell is useful to us?

CS 105 Lab As a review of what we did last week a. What are two ways in which the Python shell is useful to us? 1 CS 105 Lab 3 The purpose of this lab is to practice the techniques of making choices and looping. Before you begin, please be sure that you understand the following concepts that we went over in class:

More information

MATLAB TUTORIAL WORKSHEET

MATLAB TUTORIAL WORKSHEET MATLAB TUTORIAL WORKSHEET What is MATLAB? Software package used for computation High-level programming language with easy to use interactive environment Access MATLAB at Tufts here: https://it.tufts.edu/sw-matlabstudent

More information

Concepts Review. 2. A program is the implementation of an algorithm in a particular computer language, like C and C++.

Concepts Review. 2. A program is the implementation of an algorithm in a particular computer language, like C and C++. Concepts Review 1. An algorithm is a sequence of steps to solve a problem. 2. A program is the implementation of an algorithm in a particular computer language, like C and C++. 3. A flowchart is the graphical

More information

MAXQDA and Chapter 9 Coding Schemes

MAXQDA and Chapter 9 Coding Schemes MAXQDA and Chapter 9 Coding Schemes Chapter 9 discusses how the structures of coding schemes, alternate groupings are key to moving forward with analysis. The nature and structures of the coding scheme

More information

MATLAB SUMMARY FOR MATH2070/2970

MATLAB SUMMARY FOR MATH2070/2970 MATLAB SUMMARY FOR MATH2070/2970 DUNCAN SUTHERLAND 1. Introduction The following is inted as a guide containing all relevant Matlab commands and concepts for MATH2070 and 2970. All code fragments should

More information

Using Microsoft Word. Tables

Using Microsoft Word. Tables Using Microsoft Word are a useful way of arranging information on a page. In their simplest form, tables can be used to place information in lists. More complex tables can be used to arrange graphics on

More information

CNBC Matlab Mini-Course

CNBC Matlab Mini-Course CNBC Matlab Mini-Course David S. Touretzky October 2017 Day 3: The Really Cool Stuff 1 Multidimensional Arrays Matlab supports arrays with more than 2 dimensions. m = rand(4, 3, 2) whos m size(m) Matrix

More information

CONTENTS: Arrays Strings. COMP-202 Unit 5: Loops in Practice

CONTENTS: Arrays Strings. COMP-202 Unit 5: Loops in Practice CONTENTS: Arrays Strings COMP-202 Unit 5: Loops in Practice Computing the mean of several numbers Suppose we want to write a program which asks the user to enter several numbers and then computes the average

More information

FLORIDA INTERNATIONAL UNIVERSITY EEL-6681 FUZZY SYSTEMS

FLORIDA INTERNATIONAL UNIVERSITY EEL-6681 FUZZY SYSTEMS FLORIDA INTERNATIONAL UNIVERSITY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING EEL-6681 FUZZY SYSTEMS A Practical Guide to Model Fuzzy Inference Systems using MATLAB and Simulink By Pablo Gomez Miami,

More information

Text & Design 2015 Wojciech Piskor

Text & Design 2015 Wojciech Piskor Text & Design 2015 Wojciech Piskor www.wojciechpiskor.wordpress.com wojciech.piskor@gmail.com All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means,

More information

MATLAB GUIDE UMD PHYS401 SPRING 2011

MATLAB GUIDE UMD PHYS401 SPRING 2011 MATLAB GUIDE UMD PHYS401 SPRING 2011 Note that it is sometimes useful to add comments to your commands. You can do this with % : >> data=[3 5 9 6] %here is my comment data = 3 5 9 6 At any time you can

More information

In the first class, you'll learn how to create a simple single-view app, following a 3-step process:

In the first class, you'll learn how to create a simple single-view app, following a 3-step process: Class 1 In the first class, you'll learn how to create a simple single-view app, following a 3-step process: 1. Design the app's user interface (UI) in Xcode's storyboard. 2. Open the assistant editor,

More information

MATLAB. Creating Graphical User Interfaces Version 7. The Language of Technical Computing

MATLAB. Creating Graphical User Interfaces Version 7. The Language of Technical Computing MATLAB The Language of Technical Computing Note This revision of Creating Graphical User Interfaces, issued May 2006, adds three new chapters that provide more information for creating GUIs programmatically.

More information

The Mathcad Workspace 7

The Mathcad Workspace 7 For information on system requirements and how to install Mathcad on your computer, refer to Chapter 1, Welcome to Mathcad. When you start Mathcad, you ll see a window like that shown in Figure 2-1. By

More information

ELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah)

ELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah) Introduction ELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah) MATLAB is a powerful mathematical language that is used in most engineering companies today. Its strength lies

More information

Chapter 3 Syntax, Errors, and Debugging. Fundamentals of Java

Chapter 3 Syntax, Errors, and Debugging. Fundamentals of Java Chapter 3 Syntax, Errors, and Debugging Objectives Construct and use numeric and string literals. Name and use variables and constants. Create arithmetic expressions. Understand the precedence of different

More information

Introduction to MATLAB programming: Fundamentals

Introduction to MATLAB programming: Fundamentals Introduction to MATLAB programming: Fundamentals Shan He School for Computational Science University of Birmingham Module 06-23836: Computational Modelling with MATLAB Outline Outline of Topics Why MATLAB?

More information

Creates a 1 X 1 matrix (scalar) with a value of 1 in the column 1, row 1 position and prints the matrix aaa in the command window.

Creates a 1 X 1 matrix (scalar) with a value of 1 in the column 1, row 1 position and prints the matrix aaa in the command window. EE 350L: Signals and Transforms Lab Spring 2007 Lab #1 - Introduction to MATLAB Lab Handout Matlab Software: Matlab will be the analytical tool used in the signals lab. The laboratory has network licenses

More information

1 Introduction to Matlab

1 Introduction to Matlab 1 Introduction to Matlab 1. What is Matlab? Matlab is a computer program designed to do mathematics. You might think of it as a super-calculator. That is, once Matlab has been started, you can enter computations,

More information

INTRODUCTION TO MATLAB

INTRODUCTION TO MATLAB 1 of 18 BEFORE YOU BEGIN PREREQUISITE LABS None EXPECTED KNOWLEDGE Algebra and fundamentals of linear algebra. EQUIPMENT None MATERIALS None OBJECTIVES INTRODUCTION TO MATLAB After completing this lab

More information

My First iphone App. 1. Tutorial Overview

My First iphone App. 1. Tutorial Overview My First iphone App 1. Tutorial Overview In this tutorial, you re going to create a very simple application on the iphone or ipod Touch. It has a text field, a label, and a button. You can type your name

More information

Matlab Tutorial 1: Working with variables, arrays, and plotting

Matlab Tutorial 1: Working with variables, arrays, and plotting Matlab Tutorial 1: Working with variables, arrays, and plotting Setting up Matlab First of all, let's make sure we all have the same layout of the different windows in Matlab. Go to Home Layout Default.

More information

LAMPIRAN 1. Percobaan

LAMPIRAN 1. Percobaan LAMPIRAN 1 1. Larutan 15 ppm Polystyrene ENERGI Percobaan 1 2 3 PROBABILITY 0.07 0.116 0.113 0.152 0.127 0.15 0.256 0.143 0.212 0.203 0.22 0.24 0.234 0.23 0.234 0.3 0.239 0.35 0.201 0.263 0.37 0.389 0.382

More information

Introduction to Matlab

Introduction to Matlab What is Matlab? Introduction to Matlab Matlab is software written by a company called The Mathworks (mathworks.com), and was first created in 1984 to be a nice front end to the numerical routines created

More information

An Introduction to Processing

An Introduction to Processing An Introduction to Processing Creating static drawings Produced by: Mairead Meagher Dr. Siobhán Drohan Department of Computing and Mathematics http://www.wit.ie/ Topics list Coordinate System in Computing.

More information

MATLAB Introductory Course Computer Exercise Session

MATLAB Introductory Course Computer Exercise Session MATLAB Introductory Course Computer Exercise Session This course is a basic introduction for students that did not use MATLAB before. The solutions will not be collected. Work through the course within

More information

LAB 1 Binary Numbers/ Introduction to C. Rajesh Rajamani. ME 4231 Department of Mechanical Engineering University Of Minnesota

LAB 1 Binary Numbers/ Introduction to C. Rajesh Rajamani. ME 4231 Department of Mechanical Engineering University Of Minnesota LAB 1 Binary Numbers/ Introduction to C Rajesh Rajamani ME 431 Department of Mechanical Engineering University Of Minnesota OVERVIEW What is feedback control? Binary and Hexadecimal Numbers Working with

More information

ORB Education Quality Teaching Resources

ORB Education Quality Teaching Resources These basic resources aim to keep things simple and avoid HTML and CSS completely, whilst helping familiarise students with what can be a daunting interface. The final websites will not demonstrate best

More information

CMPT 100 : INTRODUCTION TO

CMPT 100 : INTRODUCTION TO CMPT 100 : INTRODUCTION TO COMPUTING TUTORIAL #5 : JAVASCRIPT 2 GUESSING GAME 1 By Wendy Sharpe BEFORE WE GET STARTED... If you have not been to the first tutorial introduction JavaScript then you must

More information

Exercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object

Exercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object CS1046 Lab 5 Timing: This lab should take you approximately 2 hours. Objectives: By the end of this lab you should be able to: Recognize a Boolean variable and identify the two values it can take Calculate

More information

MATLAB Basics. Configure a MATLAB Package 6/7/2017. Stanley Liang, PhD York University. Get a MATLAB Student License on Matworks

MATLAB Basics. Configure a MATLAB Package 6/7/2017. Stanley Liang, PhD York University. Get a MATLAB Student License on Matworks MATLAB Basics Stanley Liang, PhD York University Configure a MATLAB Package Get a MATLAB Student License on Matworks Visit MathWorks at https://www.mathworks.com/ It is recommended signing up with a student

More information

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb Making Plots with Matlab (last updated 5/29/05 by GGB) Objectives: These tutorials are

More information

MATLAB. MATLAB Review. MATLAB Basics: Variables. MATLAB Basics: Variables. MATLAB Basics: Subarrays. MATLAB Basics: Subarrays

MATLAB. MATLAB Review. MATLAB Basics: Variables. MATLAB Basics: Variables. MATLAB Basics: Subarrays. MATLAB Basics: Subarrays MATLAB MATLAB Review Selim Aksoy Bilkent University Department of Computer Engineering saksoy@cs.bilkent.edu.tr MATLAB Basics Top-down Program Design, Relational and Logical Operators Branches and Loops

More information

MATLAB 1. Jeff Freymueller September 24, 2009

MATLAB 1. Jeff Freymueller September 24, 2009 MATLAB 1 Jeff Freymueller September 24, 2009 MATLAB IDE MATLAB Edi?ng Window We don t need no steenkin GUI You can also use MATLAB without the fancy user interface, just a command window. Why? You can

More information

Computer Science Lab Exercise 2

Computer Science Lab Exercise 2 osc 127 Lab 2 1 of 10 Computer Science 127 - Lab Exercise 2 Excel User-Defined Functions - Repetition Statements (pdf) During this lab you will review and practice the concepts that you learned last week

More information

My First Cocoa Program

My First Cocoa Program My First Cocoa Program 1. Tutorial Overview In this tutorial, you re going to create a very simple Cocoa application for the Mac. Unlike a line-command program, a Cocoa program uses a graphical window

More information

The Language of Technical Computing. Computation. Visualization. Programming. Creating Graphical User Interfaces Version 1

The Language of Technical Computing. Computation. Visualization. Programming. Creating Graphical User Interfaces Version 1 MATLAB The Language of Technical Computing Computation Visualization Programming Creating Graphical User Interfaces Version 1 How to Contact The MathWorks: 508-647-7000 Phone 508-647-7001 Fax The MathWorks,

More information

Need help? Call: / DOCMAIL: PRINT DRIVER USER GUIDE

Need help? Call: / DOCMAIL: PRINT DRIVER USER GUIDE Need help? Call: 01761 409701 / 409702 DOCMAIL: PRINT DRIVER USER GUIDE July 2017 1 GETTING STARTED Create your letter document... If you are sending to more than one address you will have to complete

More information

Display Input and Output (I/O)

Display Input and Output (I/O) 2000 UW CSE CSE / ENGR 142 Programming I isplay Input and Output (I/O) -1 Writing Useful Programs It s hard to write useful programs using only variables and assignment statements Even our Fahrenheit to

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

Chapter 2: Lists, Arrays and Dictionaries

Chapter 2: Lists, Arrays and Dictionaries Chapter 2: Lists, Arrays and Dictionaries 1. Higher order organization of data In the previous chapter, we have seen the concept of scalar variables that define memory space in which we store a scalar,

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Downloaded from Chapter 2. Functions

Downloaded from   Chapter 2. Functions Chapter 2 Functions After studying this lesson, students will be able to: Understand and apply the concept of module programming Write functions Identify and invoke appropriate predefined functions Create

More information

3. Java - Language Constructs I

3. Java - Language Constructs I Educational Objectives 3. Java - Language Constructs I Names and Identifiers, Variables, Assignments, Constants, Datatypes, Operations, Evaluation of Expressions, Type Conversions You know the basic blocks

More information

More on Plots. Dmitry Adamskiy 30 Nov 2011

More on Plots. Dmitry Adamskiy 30 Nov 2011 More on Plots Dmitry Adamskiy adamskiy@cs.rhul.ac.uk 3 Nov 211 1 plot3 (1) Recall that plot(x,y), plots vector Y versus vector X. plot3(x,y,z), where x, y and z are three vectors of the same length, plots

More information