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)

Intersect function and setdiff function: The intersect function rather than returns all the values which can be found in both of the input argument vectors. >> intersect(v

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

Use of Nested if-else statements: By using the nested if-else to select from among the three possibilities, not all the conditions should be tested. In this situation, if x is

Plotting File data: It is frequently essential to read data from a file and plot it. Generally, this entails knowing the format of the file. For illustration, let us suppose t

Interpolation and extrapolation: In most cases, it is desired to estimate values other than at the sampled data points. For illustration, we may want to estimate what the temp

Example of Gauss-jordan: For a 2×2 system, this would results and for a 3 × 3 system, Note that the resulting diagonal form does not involve the right-most col

Scaling:   change a row by multiplying it by a non-zero scalar sri →  ri For illustration, for the matrix:

printrectarea function: function call: printrectarea(length, width) function header: function printrectarea(len, wid)   In the function call, there are two argume

Appending variables to the Mat-File: Appending to the file adds to what has been saved in a file, and is accomplished by using the -append option. For illustration, supposing