fplot Syntax Description Examples Plot Symbolic Expression Plot symbolic expression or function fplot(f) fplot(f,[xmin xmax])
|
|
- Brandon Crawford
- 6 years ago
- Views:
Transcription
1 fplot Plot symbolic expression or function Syntax fplot(f) fplot(f,[xmin xmax]) fplot(xt,yt) fplot(xt,yt,[tmin tmax]) fplot(,linespec) fplot(,name,value) fplot(ax, ) fp = fplot( ) Description fplot(f) plots symbolic input f over the default interval [-5 5]. fplot(f,[xmin xmax]) plots f over the interval [xmin xmax]. fplot(xt,yt) plots xt = x(t) and yt = y(t) over the default range of t, which is [ 5 5]. example example example fplot(xt,yt,[tmin tmax]) plots xt = x(t) and yt = y(t) over the specified range [tmin tmax]. fplot(,linespec) uses LineSpec to set the line style, marker symbol, and line color. fplot(,name,value) specifies line properties using one or more Name,Value pair arguments. Use this option with any of the input argument combinations in the previous syntaxes. Name,Value pair settings apply to all the lines plotted. To set options for individual lines, use the objects returned by fplot. example example fplot(ax, ) plots into the axes specified by ax instead of the current axes gca. fp = fplot( ) returns a function line object or parameterized line object, depending on the type of plot. Use the object to query and modify properties of a specific line. For details, see FunctionLine Properties and ParameterizedFunctionLine Properties. example Examples Plot Symbolic Expression Plot tan(x) over the default range of [-5 5]. fplot shows poles by default. For details, see the ShowPoles argument in Name-Value Pair Arguments. syms x fplot(tan(x))
2 Plot Symbolic Function Plot the symbolic function over the default range [-5 5]. syms f(x) f(x) = cos(x); fplot(f)
3 Plot Parametric Curve Plot the parameteric curve and. syms t x = cos(3*t); y = sin(2*t); fplot(x,y)
4 Specify Plotting Interval Plot over by specifying the plotting interval as the second input to fplot. syms x fplot(sin(x),[-pi/2 pi/2])
5 Plot Multiple Lines on Same Figure You can plot multiple lines either by passing the inputs as a vector or by using hold on to successively plot on the same figure. If you specify LineSpec and Name-Value arguments, they apply to all lines. To set options for individual plots, use the function handles returned by fplot. Divide a figure into two subplots using subplot. On the first subplot, plot and using vector input. On the second subplot, plot and using hold on. syms x subplot(2,1,1) fplot([sin(x) cos(x)]) title('multiple Lines Using Vector Inputs') subplot(2,1,2) fplot(sin(x)) hold on fplot(cos(x)) title('multiple Lines Using hold on Command') hold off Change Line Properties and Display Markers Plot three sine curves with a phase shift between each line. For the first line, use a linewidth of 2. For the second, specify a dashed red line style with circle markers. For the third, specify a cyan, dash-dot line style with asterisk markers. Display the legend. syms x fplot(sin(x+pi/5),'linewidth',2) hold on
6 fplot(sin(x-pi/5),'--or') fplot(sin(x),'-.*c') legend('show','location','best') hold off Control Resolution of Plot Control the resolution of a plot by using the MeshDensity option. Increasing MeshDensity can make smoother, more accurate plots, while decreasing it can increase plotting speed. Divide a figure into two by using subplot. In the first subplot, plot a step function from x = 2.1 to x = The plot's resolution is too low to detect the step function. Fix this issue by increasing MeshDensity to 39 in the second subplot. The plot now detects the step function and shows that by increasing MeshDensity you increased the plot's resolution. syms x stepfn = rectangularpulse(2.1, 2.15, x); subplot(2,1,1) fplot(stepfn); title('default MeshDensity = 23') subplot(2,1,2) fplot(stepfn,'meshdensity',39); title('increased MeshDensity = 39')
7 Modify Plot After Creation Plot sin(x). Specify an output to make fplot return the plot object. syms x h = fplot(sin(x)) h = FunctionLine with properties: Function: [1x1 sym] Color: [ ] LineStyle: '-' LineWidth: Show all properties
8 Change the default blue line to a dashed red line by using dot notation to set properties. Similarly, add 'x' markers and set the marker color to blue. h.linestyle = '--'; h.color = 'r'; h.marker = 'x'; h.markeredgecolor = 'b';
9 Add Title and Axis Labels and Format Ticks For from to, plot. Add a title and axis labels. Create the x-axis ticks by spanning the x-axis limits at intervals of pi/2. Display these ticks by using the XTick property. Create x-axis labels by using arrayfun to apply texlabel to S. Display these labels by using the XTickLabel property. To use LaTeX in plots, see latex. syms x fplot(sin(x),[-2*pi 2*pi]) grid on title('sin(x) from -2\pi to 2\pi') xlabel('x') ylabel('y') ax = gca; S = sym(ax.xlim(1):pi/2:ax.xlim(2)); ax.xtick = double(s); ax.xticklabel = arrayfun(@texlabel,s,'uniformoutput',false);
10 Re-evaluation on Zoom When you zoom into a plot, fplot re-evaluates the plot automatically. This re-evaluation on zoom reveals hidden detail at smaller scales. Plot x^3*sin(1/x) for -2 < x < 2 and < y < Zoom in on the plot using zoom and redraw the plot using drawnow. Because of re-evaluation on zoom, fplot reveals smaller-scale detail. Repeat the zoom 6 times to view smaller-scale details. To play the animation, click the image. syms x fplot(x^3*sin(1/x)); axis([ ]); for i=1:6 zoom(1.7) pause(0.5) end
11 Create Animations Create animations by changing the displayed expression using the Function, XFunction, and YFunction properties and then by using drawnow to update the plot. To export to GIF, see imwrite. By varying the variable i from 0.1 to 3, animate the parametric curve x = it sin(it) y = it cos(it). To play the animation, click the image. syms t fp = fplot(t, t); axis([ ]) for i=0.1:0.05:3 fp.xfunction = i.*t.*sin(i*t); fp.yfunction = i.*t.*cos(i*t); drawnow end
12 Input Arguments collapse all f Expression or function to plot symbolic expression symbolic function Expression or function to plot, specified as a symbolic expression or function. [xmin xmax] Plotting interval for x-coordinates [ 5 5] (default) vector of two numbers Plotting interval for x-coordinates, specified as a vector of two numbers. The default range is [-5 5]. However, if fplot detects a finite number of discontinuities in f, then fplot expands the range to show them. xt Parametric input for x-coordinates symbolic expression symbolic function Parametric input for x-coordinates, specified as a symbolic expression or function. fplot uses symvar to find the parameter. yt Parametric input for y-axis symbolic expression symbolic function Parametric input for y-axis, specified as a symbolic expression or function. fplot uses symvar to find the parameter. [tmin tmax] Range of values of parameter t [ 5 5] (default) vector of two numbers Range of values of parameter t, specified as a vector of two numbers. The default range is [-5 5]. ax Axes object axes object Axes object. If you do not specify an axes object, then fplot uses the current axes gca. LineSpec Line specification character vector string Line specification, specified as a character vector or string with a line style, marker, and color. The elements can appear in any order, and you can omit one or more options. To show only markers with no connecting lines, specify a marker and omit the line style.
13 Example: 'r--o' specifies a red color, a dashed line, and circle markers Line Style Specifier Description - Solid line (default) -- Dashed line : Dotted line -. Dash-dot line Marker Specifier o Description Circle + Plus sign * Asterisk. Point x s d ^ v Cross Square Diamond Upward-pointing triangle Downward-pointing triangle > Right-pointing triangle < Left-pointing triangle p h Color Specifier y m c r g b w k Pentagram Hexagram Description yellow magenta cyan red green blue white black Name-Value Pair Arguments Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN. Example: 'Marker','o','MarkerFaceColor','red' The function line properties listed here are only a subset. For a complete list, see FunctionLine Properties. collapse all
14 'MeshDensity' Number of evaluation points 23 (default) number Number of evaluation points, specified as a number. The default is 23. Because fplot uses adaptive evaluation, the actual number of evaluation points is greater. 'ShowPoles' Display asymptotes at poles 'on' (default) 'off' Display asymptotes at poles, specified as 'on' (default) or 'off'. The asymptotes display as gray, dashed vertical lines. fplot displays asymptotes only with the fplot(f) syntax or variants, and not with the fplot(xt,yt) syntax. 'Color' Line color [ ] (default) RGB triplet 'r' 'g' 'b'... Line color, specified as an RGB triplet or one of the color options listed in the table. For a custom color, specify an RGB triplet. An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range [0,1]; for example, [ ]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values. Option Description Equivalent RGB Triplet 'red' or 'r' Red [1 0 0] 'green' or 'g' Green [0 1 0] 'blue' or 'b' Blue [0 0 1] 'yellow' or 'y' Yellow [1 1 0] 'magenta' or 'm' Magenta [1 0 1] 'cyan' or 'c' Cyan [0 1 1] 'white' or 'w' White [1 1 1] 'black' or 'k' Black [0 0 0] Example: 'blue' Example: [0 0 1] 'LineStyle' Line style '-' (default) '--' ':' '-.' 'none' Line style, specified as one of the line styles listed in this table. Line Style Description Resulting Line '-' '--' Solid line Dashed line
15 Line Style Description Resulting Line ':' '-.' Dotted line Dash-dotted line 'none' No line No line 'LineWidth' Line width 0.5 (default) positive value Line width, specified as a positive value in points. If the line has markers, then the line width also affects the marker edges. Example: 0.75 'Marker' Marker symbol 'none' (default) 'o' '+' '*' '.' 'x' 's' 'd'... Marker symbol, specified as one of the values in this table. By default, a line does not have markers. Add markers at selected points along the line by specifying a marker. Value 'o' '+' '*' '.' 'x' 'square' or 's' 'diamond' or 'd' '^' 'v' '>' '<' 'pentagram' or 'p' 'hexagram' or 'h' 'none' Description Circle Plus sign Asterisk Point Cross Square Diamond Upward-pointing triangle Downward-pointing triangle Right-pointing triangle Left-pointing triangle Five-pointed star (pentagram) Six-pointed star (hexagram) No markers 'MarkerEdgeColor' Marker outline color 'auto' (default) RGB triplet 'r' 'g' 'b'... Marker outline color, specified as 'auto', an RGB triplet, or one of the color options listed in the table. The default value of 'auto' uses the same color as the Color property.
16 For a custom color, specify an RGB triplet. An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range [0,1]; for example, [ ]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values. Option Description Equivalent RGB Triplet 'red' or 'r' Red [1 0 0] 'green' or 'g' Green [0 1 0] 'blue' or 'b' Blue [0 0 1] 'yellow' or 'y' Yellow [1 1 0] 'magenta' or 'm' Magenta [1 0 1] 'cyan' or 'c' Cyan [0 1 1] 'white' or 'w' White [1 1 1] 'black' or 'k' Black [0 0 0] 'none' No color Not applicable Example: [ ] Example: 'blue' 'MarkerFaceColor' Marker fill color 'none' (default) 'auto' RGB triplet 'r' 'g' 'b'... Marker fill color, specified as 'auto', an RGB triplet, or one of the color options listed in the table. The 'auto' value uses the same color as the MarkerEdgeColor property. For a custom color, specify an RGB triplet. An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range [0,1]; for example, [ ]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values. Option Description Equivalent RGB Triplet 'red' or 'r' Red [1 0 0] 'green' or 'g' Green [0 1 0] 'blue' or 'b' Blue [0 0 1] 'yellow' or 'y' Yellow [1 1 0] 'magenta' or 'm' Magenta [1 0 1] 'cyan' or 'c' Cyan [0 1 1] 'white' or 'w' White [1 1 1] 'black' or 'k' Black [0 0 0] 'none' No color Not applicable Example: [ ] Example: 'green'
17 'MarkerSize' Marker size 6 (default) positive value Marker size, specified as a positive value in points. Example: 10 Output Arguments collapse all fp One or more function or parameterized line objects scalar vector One or more function or parameterized function line objects, returned as a scalar or a vector. If you use the fplot(f) syntax or a variation of this syntax, then fplot returns function line objects. If you use the fplot(xt,yt) syntax or a variation of this syntax, then fplot returns parameterized line objects. You can use these objects to query and modify properties of a specific line. For a list of properties, see FunctionLine Properties and ParameterizedFunctionLine Properties. Tips If fplot detects a finite number of discontinuities in f, then fplot expands the range to show them. See Also Functions fcontour fimplicit fimplicit3 fmesh fplot3 fsurf Properties FunctionLine Properties ParameterizedFunctionLine Properties Topics Create Plots Introduced in R2016a
Classes 7-8 (4 hours). Graphics in Matlab.
Classes 7-8 (4 hours). Graphics in Matlab. Graphics objects are displayed in a special window that opens with the command figure. At the same time, multiple windows can be opened, each one assigned a number.
More informationPROGRAMMING WITH MATLAB WEEK 6
PROGRAMMING WITH MATLAB WEEK 6 Plot: Syntax: plot(x, y, r.- ) Color Marker Linestyle The line color, marker style and line style can be changed by adding a string argument. to select and delete lines
More informationGraphics and plotting techniques
Davies: Computer Vision, 5 th edition, online materials Matlab Tutorial 5 1 Graphics and plotting techniques 1. Introduction The purpose of this tutorial is to outline the basics of graphics and plotting
More informationLogical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression.
What is the answer? >> Logical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression. The finite(x)is true for all finite numerical
More informationINC151 Electrical Engineering Software Practice. MATLAB Graphics. Dr.Wanchak Lenwari :Control System and Instrumentation Engineering, KMUTT 1
INC151 Electrical Engineering Software Practice MATLAB Graphics Dr.Wanchak Lenwari :Control System and Instrumentation Engineering, KMUTT 1 Graphical display is one of MATLAB s greatest strengths and most
More informationMechanical Engineering Department Second Year (2015)
Lecture 7: Graphs Basic Plotting MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. This section describes a few of the most
More informationComputer Programming in MATLAB
Computer Programming in MATLAB Prof. Dr. İrfan KAYMAZ Engineering Faculty Department of Mechanical Engineering Arrays in MATLAB; Vectors and Matrices Graphing Vector Generation Before graphing plots in
More informationGUI Alternatives. Syntax. Description. MATLAB Function Reference plot. 2-D line plot
MATLAB Function Reference plot 2-D line plot GUI Alternatives Use the Plot Selector to graph selected variables in the Workspace Browser and the Plot Catalog, accessed from the Figure Palette. Directly
More informationDr Richard Greenaway
SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 4 Visualising Data Dr Richard Greenaway 4 Visualising Data 4.1 Simple Data Plotting You should now be familiar with the plot function which is
More informationDepartment 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 informationMatlab 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 informationBasic Graphs. Dmitry Adamskiy 16 November 2011
Basic Graphs Dmitry Adamskiy adamskiy@cs.rhul.ac.uk 16 November 211 1 Plot Function plot(x,y): plots vector Y versus vector X X and Y must have the same size: X = [x1, x2 xn] and Y = [y1, y2,, yn] Broken
More informationThis module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in
This module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in subsequent modules to help to teach research related concepts
More informationBasic plotting commands Types of plots Customizing plots graphically Specifying color Customizing plots programmatically Exporting figures
Basic plotting commands Types of plots Customizing plots graphically Specifying color Customizing plots programmatically Exporting figures Matlab is flexible enough to let you quickly visualize data, and
More informationAdditional Plot Types and Plot Formatting
Additional Plot Types and Plot Formatting The xy plot is the most commonly used plot type in MAT- LAB Engineers frequently plot either a measured or calculated dependent variable, say y, versus an independent
More informationMATLAB 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 informationIntroduction to MATLAB: Graphics
Introduction to MATLAB: Graphics Eduardo Rossi University of Pavia erossi@eco.unipv.it September 2014 Rossi Introduction to MATLAB Financial Econometrics - 2014 1 / 14 2-D Plot The command plot provides
More informationCSE 123. Plots in MATLAB
CSE 123 Plots in MATLAB Easiest way to plot Syntax: ezplot(fun) ezplot(fun,[min,max]) ezplot(fun2) ezplot(fun2,[xmin,xmax,ymin,ymax]) ezplot(fun) plots the expression fun(x) over the default domain -2pi
More informationQUICK 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 informationPART 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 informationDr. Iyad Jafar. Adapted from the publisher slides
Computer Applications Lab Lab 6 Plotting Chapter 5 Sections 1,2,3,8 Dr. Iyad Jafar Adapted from the publisher slides Outline xy Plotting Functions Subplots Special Plot Types Three-Dimensional Plotting
More informationMATLAB Modul 2. Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition
MATLAB Modul 2 Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition Angela B. Shiflet and George W. Shiflet Wofford College 2014 by Princeton University Press Introduction
More informationGraphics Example a final product:
Basic 2D Graphics 1 Graphics Example a final product: TITLE LEGEND YLABEL TEXT or GTEXT CURVES XLABEL 2 2-D Plotting Specify x-data and/or y-data Specify color, line style and marker symbol (Default values
More information12 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 informationThe 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 informationOverview. Lecture 13: Graphics and Visualisation. Graphics & Visualisation 2D plotting. Graphics and visualisation of data in Matlab
Overview Lecture 13: Graphics and Visualisation Graphics & Visualisation 2D plotting 1. Plots for one or multiple sets of data, logarithmic scale plots 2. Axis control & Annotation 3. Other forms of 2D
More information2D LINE PLOTS... 1 The plot() Command... 1 Labeling and Annotating Figures... 5 The subplot() Command... 7 The polarplot() Command...
Contents 2D LINE PLOTS... 1 The plot() Command... 1 Labeling and Annotating Figures... 5 The subplot() Command... 7 The polarplot() Command... 9 2D LINE PLOTS One of the benefits of programming in MATLAB
More informationINTRODUCTION TO MATLAB PLOTTING WITH MATLAB
1 INTRODUCTION TO MATLAB PLOTTING WITH MATLAB Plotting with MATLAB x-y plot Plotting with MATLAB MATLAB contains many powerful functions for easily creating plots of several different types. Command plot(x,y)
More informationProgramming 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 informationDataPlotClasses for REALBasic
User s Guide v 1.3.1 Roger Meier, January 2015 Table of Contents DataPlotClasses for REALBasic... 1 Table of Contents... 1 List of Figures... 4 List of Tables... 4 1. Introduction... 5 2. Getting Started...
More informationPyPlot. The plotting library must be imported, and we will assume in these examples an import statement similar to those for numpy and math as
Geog 271 Geographic Data Analysis Fall 2015 PyPlot Graphicscanbeproducedin Pythonviaavarietyofpackages. We willuseapythonplotting package that is part of MatPlotLib, for which documentation can be found
More informationDSP Laboratory (EELE 4110) Lab#1 Introduction to Matlab
Islamic University of Gaza Faculty of Engineering Electrical Engineering Department 2012 DSP Laboratory (EELE 4110) Lab#1 Introduction to Matlab Goals for this Lab Assignment: In this lab we would have
More informationMATLAB primer for CHE 225
MATLAB primer for CHE 225 The following pages contain a brief description of the MATLAB features are used in CHE 225. This document is best used in conjunction with the MATLAB codes posted on Vista. Find
More informationChapter 3: Introduction to MATLAB Programming (4 th ed.)
Chapter 3: Introduction to MATLAB Programming (4 th ed.) Algorithms MATLAB scripts Input / Output o disp versus fprintf Graphs Read and write variables (.mat files) User-defined Functions o Definition
More informationA MATLAB Exercise Book. Ludmila I. Kuncheva and Cameron C. Gray
A MATLAB Exercise Book Ludmila I. Kuncheva and Cameron C. Gray Contents 1 Getting Started 1 1.1 MATLAB................................................. 1 1.2 Programming Environment......................................
More informationPart #6. A0B17MTB Matlab. Miloslav Čapek Filip Kozák, Viktor Adler, Pavel Valtr
A0B17MTB Matlab Part #6 Miloslav Čapek miloslav.capek@fel.cvut.cz Filip Kozák, Viktor Adler, Pavel Valtr Department of Electromagnetic Field B2-626, Prague Learning how to Visualizing in Matlab #1 Debugging
More informationAMS 27L LAB #2 Winter 2009
AMS 27L LAB #2 Winter 2009 Plots and Matrix Algebra in MATLAB Objectives: 1. To practice basic display methods 2. To learn how to program loops 3. To learn how to write m-files 1 Vectors Matlab handles
More informationPyPlot. The plotting library must be imported, and we will assume in these examples an import statement similar to those for numpy and math as
Geog 271 Geographic Data Analysis Fall 2017 PyPlot Graphicscanbeproducedin Pythonviaavarietyofpackages. We willuseapythonplotting package that is part of MatPlotLib, for which documentation can be found
More informationIntroduction to Matlab. WIAA Technical Workshop #2 10/20/2015
Introduction to Matlab WIAA Technical Workshop #2 10/20/2015 * This presentation is merely an introduction to some of the functions of MATLAB and is not a comprehensive review of their capabilities. **
More informationPurpose of the lecture MATLAB MATLAB
Purpose of the lecture MATLAB Harri Saarnisaari, Part of Simulations and Tools for Telecommunication Course This lecture contains a short introduction to the MATLAB For further details see other sources
More informationNatSciLab - Numerical Software Introduction to MATLAB
Outline 110112 NatSciLab - Numerical Software Introduction to MATLAB Onur Oktay Jacobs University Bremen Spring 2010 Outline 1.m files 2 Programming Branching (if, switch) Loops (for, while) 3 Anonymous
More informationINTRODUCTION 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 informationInteractive Computing with Matlab. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University
Interactive Computing with Matlab Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu Starting Matlab Double click on the Matlab icon, or on unix systems
More informationVersion 5.0. Alexander Friedman and Jamie Raymond. June 6, 2010
PLoT: Graph Plotting Version 5.0 Alexander Friedman and Jamie Raymond June 6, 2010 PLoT (a.k.a. PLTplot) provides a basic interface for producing common types of plots such as line and vector field plots
More informationMATLAB 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 informationIntroduction to Scientific Programming in MATLAB
Introduction to Scientific Programming in MATLAB Derrick Kearney HUBzero Platform for Scientific Collaboration Purdue University Original slides by Michael McLennan This work licensed under Creative Commons
More information1 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 informationSTAT 391 Handout 1 Making Plots with Matlab Mar 26, 2006
STAT 39 Handout Making Plots with Matlab Mar 26, 26 c Marina Meilă & Lei Xu mmp@cs.washington.edu This is intended to help you mainly with the graphics in the homework. Matlab is a matrix oriented mathematics
More informationTikZ & PGF(plots) Daniel Knittl-Frank. May This work is licensed under the Creative Commons Attribution-ShareAlike 3.
TikZ & PGF(plots) Daniel Knittl-Frank May 2015 This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Austria license (CC-BY-SA) 2D value plot Bitstamp USD 20,000 Weighted Price High
More informationMATLAB Tutorial. 1. The MATLAB Windows. 2. The Command Windows. 3. Simple scalar or number operations
MATLAB Tutorial The following tutorial has been compiled from several resources including the online Help menu of MATLAB. It contains a list of commands that will be directly helpful for understanding
More informationMATLAB Modul 3. Introduction
MATLAB Modul 3 Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition Angela B. Shiflet and George W. Shiflet Wofford College 2014 by Princeton University Press Introduction
More informationYou can change the line style by adding some information in the plot command within single quotation marks.
Plotting Continued: You can change the line style by adding some information in the plot command within single quotation marks. y = x.^2; plot(x,y, '-xr') xlabel('x, meters') ylabel('y, meters squared')
More informationLab #1 Revision to MATLAB
Lab #1 Revision to MATLAB Objectives In this lab we would have a revision to MATLAB, especially the basic commands you have dealt with in analog control. 1. What Is MATLAB? MATLAB is a high-performance
More informationChapter 2 (Part 2) MATLAB Basics. dr.dcd.h CS 101 /SJC 5th Edition 1
Chapter 2 (Part 2) MATLAB Basics dr.dcd.h CS 101 /SJC 5th Edition 1 Display Format In the command window, integers are always displayed as integers Characters are always displayed as strings Other values
More informationWorking with Charts Stratum.Viewer 6
Working with Charts Stratum.Viewer 6 Getting Started Tasks Additional Information Access to Charts Introduction to Charts Overview of Chart Types Quick Start - Adding a Chart to a View Create a Chart with
More informationSGN Introduction to Matlab
SGN-84007 Introduction to Matlab Lecture 4: Data Visualization Heikki Huttunen Alessandro Foi October 10, 2016 Outline Basics: figure, axes, handles, properties; Plotting univariate and multivariate data;
More informationBy Edward Grossman Edited and Updated by Mark Turner
By Edward Grossman Edited and Updated by Mark Turner Table of Contents Chapter Pages Chapter : Interactive Graphing..7 Chapter : Script-files or M-files..6 Chapter 3: Data Plotting 3. 3. Chapter 4: Three
More informationGetting Started. Chapter 1. How to Get Matlab. 1.1 Before We Begin Matlab to Accompany Lay s Linear Algebra Text
Chapter 1 Getting Started How to Get Matlab Matlab physically resides on each of the computers in the Olin Hall labs. See your instructor if you need an account on these machines. If you are going to go
More informationLab 4: Structured Programming I
4.1 Introduction Lab 4: Structured Programming I Lab this week is going to focus on selective structures and functions. 4.2 Resources The additional resources required for this assignment include: 0 Books:
More informationTrigonometric Graphs Dr. Laura J. Pyzdrowski
1 Names: About this Laboratory In this laboratory, we will examine trigonometric functions and their graphs. Upon completion of the lab, you should be able to quickly sketch such functions and determine
More informationA General Introduction to Matlab
Master Degree Course in ELECTRONICS ENGINEERING http://www.dii.unimore.it/~lbiagiotti/systemscontroltheory.html A General Introduction to Matlab e-mail: luigi.biagiotti@unimore.it http://www.dii.unimore.it/~lbiagiotti
More informationMATLAB Guide to Fibonacci Numbers
MATLAB Guide to Fibonacci Numbers and the Golden Ratio A Simplified Approach Peter I. Kattan Petra Books www.petrabooks.com Peter I. Kattan, PhD Correspondence about this book may be sent to the author
More informationWhat is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment
What is MATLAB? MATLAB PROGRAMMING Stands for MATrix LABoratory A software built around vectors and matrices A great tool for numerical computation of mathematical problems, such as Calculus Has powerful
More informationIntroduction to Matlab to Accompany Linear Algebra. Douglas Hundley Department of Mathematics and Statistics Whitman College
Introduction to Matlab to Accompany Linear Algebra Douglas Hundley Department of Mathematics and Statistics Whitman College August 27, 2018 2 Contents 1 Getting Started 5 1.1 Before We Begin........................................
More informationIntroduction 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 informationBasic Beginners Introduction to plotting in Python
Basic Beginners Introduction to plotting in Python Sarah Blyth July 23, 2009 1 Introduction Welcome to a very short introduction on getting started with plotting in Python! I would highly recommend that
More informationWhat is Matlab? A software environment for interactive numerical computations
What is Matlab? A software environment for interactive numerical computations Examples: Matrix computations and linear algebra Solving nonlinear equations Numerical solution of differential equations Mathematical
More informationPoints Lines Connected points X-Y Scatter. X-Y Matrix Star Plot Histogram Box Plot. Bar Group Bar Stacked H-Bar Grouped H-Bar Stacked
Plotting Menu: QCExpert Plotting Module graphs offers various tools for visualization of uni- and multivariate data. Settings and options in different types of graphs allow for modifications and customizations
More informationMath 375 Natalia Vladimirova (many ideas, examples, and excersises are borrowed from Profs. Monika Nitsche, Richard Allen, and Stephen Lau)
Natalia Vladimirova (many ideas, examples, and excersises are borrowed from Profs. Monika Nitsche, Richard Allen, and Stephen Lau) January 24, 2010 Starting Under windows Click on the Start menu button
More information1. 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 informationMAT 275 Laboratory 1 Introduction to MATLAB
MATLAB sessions: Laboratory 1 1 MAT 275 Laboratory 1 Introduction to MATLAB MATLAB is a computer software commonly used in both education and industry to solve a wide range of problems. This Laboratory
More informationCreates 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 informationGraphing Single Subject Research Data. AAC Colloquium October 18 th, 2017
Graphing Single Subject Research Data AAC Colloquium October 18 th, 2017 Set up the spreadsheet Input the data Graph Harry s data Click and hold, then drag to select Harry s data Just for the top graph
More informationIntroduction to MATLAB
Introduction to MATLAB Violeta Ivanova, Ph.D. MIT Academic Computing violeta@mit.edu http://web.mit.edu/violeta/www/iap2006 Topics MATLAB Interface and Basics Linear Algebra and Calculus Graphics Programming
More information2. Plotting in MATLAB
2. Plotting in MATLAB MATLAB provides several methods for plotting the graphs of functions and more general curves. The easiest to use is what we will call EZ plotting, since it uses the command ezplot
More informationTable of Contents. Basis CEMTool 7 Tutorial
PREFACE CEMTool (Computer-aided Engineering & Mathematics Tool) is a useful computational tool in science and engineering. No matter what you background be it physics, chemistry, math, or engineering it
More informationAdobe Illustrator CS Design Professional CREATING TEXT AND GRADIENTS
Adobe Illustrator CS Design Professional CREATING TEXT AND GRADIENTS Chapter Lessons Create and format text Flow text into an object Position text on a path Create colors and gradients Apply colors and
More informationGraphics in MATLAB. Responsible teacher: Anatoliy Malyarenko. November 10, Abstract. Basic Plotting Commands
Graphics in MATLAB Responsible teacher: Anatoliy Malyarenko November 10, 2003 Contents of the lecture: Two-dimensional graphics. Formatting graphs. Three-dimensional graphics. Specialised plots. Abstract
More informationPlotting x-y (2D) and x, y, z (3D) graphs
Tutorial : 5 Date : 9/08/2016 Plotting x-y (2D) and x, y, z (3D) graphs Aim To learn to produce simple 2-Dimensional x-y and 3-Dimensional (x, y, z) graphs using SCILAB. Exercises: 1. Generate a 2D plot
More informationTOPIC 6 Computer application for drawing 2D Graph
YOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM TOPIC 6 Computer application for drawing 2D Graph Plotting Elementary Functions Suppose we wish
More informationChapter 2 Vectors and Graphics
Chapter 2 Vectors and Graphics We start this chapter by explaining how to use vectors in MATLAB, with an emphasis on practical operations on vectors in the plane and in space. Remember that n-dimensional
More informationPrimissimiEsempi File: /opt/sage-4.7.1/local/lib/python2.6/site-packages/sage/misc/decorators.py
PrimissimiEsempi Vogliamo disegnare il grafico della funzione 1 + 1 x 1 var('x') x f(x)=1+1/(x-1) plot(f,-1,3) plot? File: /opt/sage-4.7.1/local/lib/python2.6/site-packages/sage/misc/decorators.py Type:
More informationMATLAB Fundamentals. Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University
MATLAB Fundamentals Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University Reference: 1. Applied Numerical Methods with MATLAB for Engineers, Chapter 2 &
More informationComputational Foundations of Cognitive Science. Inverse. Inverse. Inverse Determinant
Computational Foundations of Cognitive Science Lecture 14: s and in Matlab; Plotting and Graphics Frank Keller School of Informatics University of Edinburgh keller@inf.ed.ac.uk February 23, 21 1 2 3 Reading:
More informationBioFuel Graphing instructions using Microsoft Excel 2003 (Microsoft Excel 2007 instructions start on page mei-7)
BioFuel Graphing instructions using Microsoft Excel 2003 (Microsoft Excel 2007 instructions start on page mei-7) Graph as a XY Scatter Chart, add titles for chart and axes, remove gridlines. A. Select
More informationMore 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 informationChapter 2. MATLAB Fundamentals
Chapter 2. MATLAB Fundamentals Choi Hae Jin Chapter Objectives q Learning how real and complex numbers are assigned to variables. q Learning how vectors and matrices are assigned values using simple assignment,
More informationAppendix 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 informationMath 291: Lecture 10
Math 291: Lecture 10 Justin A. James Minnesota State University Moorhead http://web.mnstate.edu/jamesju/spr2017/m291-01s17.html jamesju@mnstate.edu April 3, 2017 Justin A. James (MSUM) Math 291: Lecture
More informationMATH (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 information1. (10 pts) Order the following three images by how much memory they occupy:
CS 47 Prelim Tuesday, February 25, 2003 Problem : Raster images (5 pts). (0 pts) Order the following three images by how much memory they occupy: A. a 2048 by 2048 binary image B. a 024 by 024 grayscale
More informationipad App User Guide Getting Started with Desmos Tables Variables and Sliders Settings, Zoom, and Language Graphable Expressions Supported Functions
ipad App User Guide Learn more about graphing functions, plotting tables of data, evaluating equations, exploring transformations, and more! If you have questions that aren t answered in here, send us
More informationA Quick Guide to Gnuplot. Andrea Mignone Physics Department, University of Torino AA
A Quick Guide to Gnuplot Andrea Mignone Physics Department, University of Torino AA 2017-2018 What is Gnuplot? Gnuplot is a free, command-driven, interactive, function and data plotting program, providing
More informationFF505/FY505 Computational Science. MATLAB Graphics. Marco Chiarandini
FF505/FY505 Computational Science MATLAB Marco Chiarandini (marco@imada.sdu.dk) Department of Mathematics and Computer Science (IMADA) University of Southern Denmark Outline 1. 2D Plots 3D Plots 2 Outline
More informationManaging Trends. About Trends CHAPTER. Send documentation comments to
CHAPTER 11 Trends provides historical data of a node in the network over a period of time. When the value of a node in the specified trend changes, the changes are recorded in the trend logs and displayed
More informationPLoT: Graph Plotting
PLoT: Graph Plotting Version 5.2 Neil Toronto November 8, 2011 (require plot) PLoT provides a flexible interface for producing nearly any kind of plot. It includes many common
More informationA Quick Guide to MATLAB
Appendix C A Quick Guide to MATLAB In this course we will be using the software package MATLAB. The most recent version can be purchased directly from the MATLAB web site: http://www.mathworks.com/academia/student
More informationBasic statistical operations
COSC 6397 Big Data Analytics Fundamental Analytics Edgar Gabriel Spring 2014 Basic statistical operations Calculating minimum, maximum, mean, median, standard deviation Data typically multi-dimensional
More informationCALCULUS - PRACTICAL II - ELEMENTARY CALCULUS
CALCULUS - PRACTICAL II - ELEMENTARY CALCULUS PEDRO FORTUNY AYUSO The students will have already received the lessons about its, continuity and derivation although these concepts should not be new for
More informationIntroduction to MATLAB
Introduction to MATLAB Violeta Ivanova, Ph.D. Office for Educational Innovation & Technology violeta@mit.edu http://web.mit.edu/violeta/www Topics MATLAB Interface and Basics Calculus, Linear Algebra,
More information