Example of plotting from a function, MATLAB in Engineering

Example of Plotting from a Function:

For illustration, the function can be called as shown below:

     >> y = [1:2:9].^3

     y =

    1  27  125  343  729

     >> rca = {'bar', 'area', 'plot'}

     >> plotywithcell(y, rca)

The function is common and works for any number of plot types stored in the cell array.

Posted Date: 10/22/2012 2:14:53 AM | Location : United States







Related Discussions:- Example of plotting from a function, Assignment Help, Ask Question on Example of plotting from a function, Get Answer, Expert's Help, Example of plotting from a function Discussions

Write discussion on Example of plotting from a function
Your posts are moderated
Related Questions
Expanding a function: The expand function will multiply out terms, and factor will do the opposite: >> expand((x+2)*(x-1)) ans = x^2 x-2 >> factor(ans)

Function fieldnames - structure functions: The function fieldnames will return the names of the fields which are contained in the structure variable. >> pack_fields = fiel

calcrectarea subfunction: function call: area = calcrectarea(len,wid); function header: function area = calcrectarea(len, wid)   In the function call, the two arg

Removing Whitespace Characters: The MATLAB has functions which will eliminate trailing blanks from the end of a string and/or leading blanks from the starting of a string.

Text graphic function - Graphics objects: The text graphic function permits text to be printed in a Figure Window, involving special characters which are printed by using \spe

Illustration of initializing the data structure: illustration of initializing the data structure by preallocating is here as shown: >> cyls(3) = struct('code', 'c', 'dimen

Gauss-Jordan: The Gauss-Jordan elimination technique begins in similar way which the Gauss elimination technique does, but then rather than of back-substitution, the eliminati

Write a program to examine exponential function: We will write a program to examine the value of e and the exponential function. It will be a menu-driven. The menu options wil

Example of file ploting data: As the other example, a data file called 'compsales.dat' stores the sales figures (in millions) for divisions in a company. Each line in the f

Matrix solutions to systems of the linear algebraic equations: The linear algebraic equation is an equation of the form a 1 x 1 + a 2 x 2 + a 3 x 3    .  .  .  .  a n x n