Posts Tagged ‘plot’
Matlab Graphics Windows & the Figure
Figures are the windows in which MATLAB displays graphics. Figures contain menus, toolbars, user-interface objects, context menus, axes and, as axes children, all other types of graphics objects. Read More
Tags: Automatic Axes Resize, ButtonDownFcn, Callback Properties for Graphics Objects, Controlling Graphics Output, Creating Graphical User Interfaces, CurrentFigure >, Example — Transforming a Hierarchy of Objects, Example — Using Figure Panels, figure, Figure Properties, gcf, Graphics, Graphics Windows, gui, HandleVisibility, matlab, MenuBar, Multiple Axes per Figure, Name, Objects That Can Contain Other Objects, plot, ResizeFcn, Root Properties, surf, Toolbar, UIContextMenu, WindowButtonDownFcn, WindowButtonMotionFcn, WindowButtonUpFcn, windows, WindowStyle
Generating MATLAB Code to Reproduce a Graph
Create a Stem Plot and Generate Code for It
Suppose you have created the following graph. Read More
Matlab Editing Plots
Why Edit Plots?
MATLAB graphs are formatted to provide readability, setting the scale of axes, including tick marks on the axes, and using color and line style to distinguish the plots in the graph. However, if you are creating presentation graphics, you might want to change this default formatting or add descriptive labels, titles, legends, and other annotations to help explain your data. Read More
Matlab Class for Graphing Functions
Display Fully Commented Example Code
The class block is the code that starts with the classdef key word and terminates with the end key word. The following example illustrated a simple class definition that uses: Read More
Specifying a Data Source
Creating the Graph
First define two variables by issuing these statements in the command window. Read More
Creating m-files in Matlab
Open an edit window where we can write the command lines. Click on the white sheet in the menu under File or simply write edit in the command window. Alternatively File->New ->M-file. The following is written in the edit window: Read More
Analysis of Functions, Interpolation, Curve Fitting, Integrals and Differential Equations 2
Localize minima and maxima of functions
Let us try to find the local minima and maxima for the function func(x). The interval of interest is [-6 0]. The algorithms are iterative. There are 2 methods to use. The first one decides x in a given interval, and the second one looks for x around an initial guess. To decide the maxima we are looking for an x that minimizes the negative function: -func(x). Read More
Tags: Analysis of Functions, applications, Command Window, curve, Define, differential, end, equations, Examples, fitting, for, format, full, Functions, grid, help, hold, if, inf, info, integral, integrals, integrand, interpolation, legend, load, matlab, mesh, meshgrid, minus, plot, polynomial, rand, randn, rem, round, sign, sum, title, tutorials, ver, what