CSCI N317 Computation for Scientific Applications Unit 1 – 5 MATLAB

Slides:



Advertisements
Similar presentations
Introduction to Engineering MATLAB – 11 Plotting - 4 Agenda Multiple curves Multiple plot.
Advertisements

Matlab Graphics S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: 2D Graphics.
Introduction to Matlab:
MATLAB’s extensive, device-independent plotting capabilities are one of its most powerful features. They make it very easy to plot any data at any time.
Maths for Computer Graphics
MATLAB GRAPHICS 2-D.
EGR106 Week 6 MATLAB FILES Two Dimensional Plots Multiple Plots
MATLAB Week 3 17 November Outline Graphics – Basic plotting – Editing plots from GUI – Editing plots from m-file – Advanced plotting commands.
Introduction to Matlab Jianguo Wang CSSCR September 2009.
 1999 BG Mobasseri1 8/29/2015 MATLAB GRAPHICS - PART II ADVANCED PLOTTING June 4, ‘99.
SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 5”
Martin Ellison University of Warwick and CEPR Bank of England, December 2005 Introduction to MATLAB.
PLOTS AND FIGURES DAVID COOPER SUMMER Plots One of the primary uses for MATLAB is to be able to create publication quality figures from you data.
ENG College of Engineering Engineering Education Innovation Center 1 2D Plots 1 in MATLAB Topics Covered: 1.Plotting basic 2-D plots The plot()
CMPS 1371 Introduction to Computing for Engineers PLOTTING.
1 "A picture is worth a thousand words." Graphical representation is useful for: Error detection - you can locate outliers in a dataset, program bugs,
Statistics and Simple Plots. Outline Announcements: –Homework II: due Today. by 5, by Statistics Simple plots.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
A L I MAM M OHAMMAD B IN S AUD I SLAMIC U NIVERSITY C OLLEGE OF S CIENCES D EPARTMENT OF M ATHEMATICS MATLAB 251 : MATH SOFTWARE Introduction to MATLAB.
Barak Shenhav Early Evolution Course 11 Feb 2001 MATLAB Visualization, Functions & Debugging.
Introduction to MATLAB Session 5 Simopekka Vänskä, THL 2010.
Matlab Screen  Command Window  type commands  Current Directory  View folders and m-files  Workspace  View program variables  Double click on a.
1. 2 Word Processing Word Processing is writing words and sentences on the computer. It is easy to change or move text in a word document. People use.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 4: Intro to Plotting Wednesday 10 Sept 2014 EGR 115 Introduction to Computing for Engineers.
Recap Chapter 5 “Plotting” Two Dimensional Plots Simple x-y Plots Titles, Labels and Grids Multiple Plots.
Recap Plots with More than one Line Plots of Complex Arrays Line, Color and Mark Style Axis Scaling and Annotating Plots Subplots Polar Plots Logarithmic.
EGR 106 Lecture 6 2-D Plotting Graphical presentation has become the standard method to show technical information. Engineers use plots to analyze, visualize,
1 Lecture 5 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
EGR 115 Introduction to Computing for Engineers Complex Numbers & 3D Plots – Part 2 Friday 07 Nov 2014 EGR 115 Introduction to Computing for Engineers.
Program design and algorithm development We will consider the design of your own toolbox to be included among the toolboxes already available with your.
GRAPHICS AND VISUALISATION WITH MATLAB UNIVERSITY OF SHEFFIELD CiCS DEPARTMENT Deniz Savas & Mike Griffiths May 2015.
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Lab 2 : potting to Matlab Networks.
An Introduction to Programming in Matlab Emily Blumenthal
EEE 242 Computer Tools for Electrical Engineering
How to use MATLAB (using M-files) Double click this icon To start Matlab 6.5.
Session III Plotting in MATLAB Rajeev Madazhy Dept of Mechanical Engineering LSU MATLAB Tutorials.
MATLAB ……………….matrix laboratory. Bhushan D Patil PhD Research Scholar Department of Electrical Engineering Indian Institute of Technology, Bombay Powai,
Plotting ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
MATLAB LABORATORY SESSION
Computer Application in Engineering Design
Introduction to Mat lab
Plotting Chapter 5.
3D-Graphs A 3D surface is defined as: z = f(x, y)
Lecture 25.
Ch3 Graphics Overview of Plotting Editing Plots
Lecture 25: Exploring data
Enhancing a Document Part 1
Matrices and Arrays.
Introduction to MATLAB
MatLab – Palm Chapter 5 2-D & 3-D Plots
MATLAB DENC 2533 ECADD LAB 9.
Introduction To MATLAB
Net 222: Communications and networks fundamentals (Practical Part)
Net 222: Communications and networks fundamentals (Practical Part)
Productivity Software
Net 222: Communications and networks fundamentals (Practical Part)
Enhancing a Document Part 1
MATLAB How to use (using M-files) Double click this icon
MATLAB How to use (using M-files) Double click this icon
MatLab – 2D Plots 2 MATLAB has many built-in functions and commands to create various types of plots. Instructor notes: We start with an example of some.
MATLAB How to use (using M-files)
Introduction to MATLAB Plotting LAB 3
Yang-Ming University, Taipei, Taiwan
Plotting Signals in MATLAB
Designing Effective Graphics Using MATLAB
Introduction to MATLAB
Announcements P3 due today
Lesson 2: Make a Quiz Unit 1: Formatting Lists,
Introduction to Matlab
Presentation transcript:

CSCI N317 Computation for Scientific Applications Unit 1 – 5 MATLAB Graphics

Basic 2-D Graphs Try out the following (if copy from this slide, retype single quotes in MatLab) y=[1,3,1,3,2,4]; plot(y) plot(rand(1,20)) x=0:pi/40:4*pi; plot(x, sin(x)) plot([0 4], [1 3]) gtext(‘notes’) %place cursor on the graph to insert notes grid title(‘x square’) xlabel(‘horizontal’) ylabel(‘vertical’) help plot %documentation about plot()

Basic 2-D Graphs There are different ways of drawing multiple plots on the same set of axes. Axes may be scaled as new graphs are added. Method one hold … hold Method two plot(x1, y1, x2, y2, x3, y3, …) %each pair will be a different color plotyy() gives you two y labels, on left and right

Basic 2-D Graphs Method three plot(x,y) where x and y are both matrices, or one is a vector and one is a matrix

Basic 2-D Graphs Line styles, markers and color plot(x,y, '--') plot(x,y, ‘o') plot(x,y, 'o--') plot(x,y, 'om--') You can also format these properties in the figure window.

Basic 2-D Graphs subplot Divide the figure window into several sections with each section having a different plot E.g. subplot(2,3,1) %divide the figure into 2 rows and 3 columns and place the current plot into the first section subplot(1,1,1) to go back

Basic 2-D Graphs figure(h) where h is an integer creates a new figure window or makes figure h the current figure. Subsequent plots are drawn in the current figure. E.g. figure(2) clf clears the current figure window. cla deletes all the plots and text from the current axes, leaves only the x- and y-axes and their associated information.

Basic 2-D Graphs Other type of graphs https://www.youtube.com/watch?v=XoF1PECzfMU

Basic 2-D Graphs Other type of graphs

3-D PLOTS Draw 3-D plots either in lines or as various types of surfaces. plot3(x, y, z) plot3(rand(1,10), rand(1,10), rand(1,10))

3-D PLOTS Mesh Surfaces E.g. z = x^2 – y^2 Step 1, set up the grid in the x-y plane over which the surface is to be plotted. meshgrid function can be used: [x,y] = meshgrid(0:5); Result: columns of matrix x hold the x co-ordinates of the points in the grid, while the rows of y hold the y co-ordinates. Note: the finer the grids, the finer the mesh surface. E.g. [x,y] = meshgrid(0:0.2:5);

3-D PLOTS Mesh Surfaces E.g. z = x^2 – y^2 Step 2, generate surface points z Step3, plot the surface mesh(z) or mesh(x,y,z) surf(z) or surf(x,y,z)

3-D PLOTS Mesh Surfaces E.g. Mexican Hat Note: the finer the grids, the finer the mesh surface. E.g. [x,y] = meshgrid(-8:0.1:8);

3-D PLOTS Contour Plots E.g. Initial heat distribution over a steel plate

Image Processing https://www.mathworks.com/videos/image-processing-made-easy-81718.html Image enhancement – removing noise and sharpening an image Image segmentation – isolating objects of interest and gathering statistics Image registration – aligning multiple images from different camera sources 

Image Processing Additional videos – Image processing tool box https://www.mathworks.com/videos/introduction-to-matlab-with-image-processing-toolbox-90409.html Rapid development of image processing algorithms https://www.mathworks.com/videos/rapid-development-of-image-processing-algorithms-with-matlab-92910.html Medical image processing with Matlab https://www.mathworks.com/videos/medical-image-processing-with-matlab-81890.html Matlab for life scientists https://www.mathworks.com/videos/introduction-to-data-analysis-in-matlab-for-life-scientists-81712.html