Generating MATLAB Code to Reproduce a Graph

April 24th, 2010 No Comments   Posted in Examples

Create a Stem Plot and Generate Code for It

Suppose you have created the following graph. Read More

Matlab Editing Plots

April 24th, 2010 No Comments   Posted in Documents

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

April 23rd, 2010 No Comments   Posted in Examples

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

April 13th, 2010 No Comments   Posted in Examples

Creating the Graph

First define two variables by issuing these statements in the command window. Read More

Creating m-files in Matlab

March 26th, 2010 No Comments   Posted in Examples

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

March 23rd, 2010 No Comments   Posted in Documents

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