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
Forward elimination: In forward elimination, we want to obtain a 0 in the a 21 position. To accomplish this, we can alter the second line in the matrix by subtracting from it

Finding products by for loop: an illustration, when 5 is passed to be the value of the input argument n, the function will compute and return 1 + 2 + 3 + 4 + 5, or 15: >> s

deblank function: The deblank function eliminates only trailing blanks from the string, not leading the blanks. The strtrim function will eliminate both the leading and traili

Sorting Vectors of structures: Whenever working with vector of structures, it is very common to sort based on a particular field within the structures. For illustration, recal

Illustration of Subfunctions: This is an illustration of running this program: >> rectarea Please enter the length: 6 Please enter the width: 3 For a rectan

Individual structure variable: The individual structure variable for one software package may look like this: The name of the structure variable is a package; it has f

Matrix definitions: As we know the matrix can be thought of as a table of values in which there are both rows and columns. The most common form of a matrix A (that is sometime

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

Replacing, Finding, and separating strings: There are numerous functions which find and replace the strings, or parts of strings, within the other strings and functions which

Logical scalar values: The MATLAB also has or and and operators which work element wise for the matrices: These operators will compare any of the two vectors or matric