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
Square Matrices: If a matrix has similar number of rows and columns, for illustration, if m == n, the matrix is square matrix. The definitions which follow in this part apply

Example to change the line width from the default: For illustration, to change the line width from the default of 0.5 to 1.5: >> set(hl,'LineWidth',1.5) As long as the

Plotting from a Function: The following function creates a Figure Window as shown in figure, which shows various types of plots for similar y vector. The vector is passed as a


num2str function: The num2str function, that converts real numbers, can be called in many ways. If only the real number is passed to the num2str function, it will generate a s

Program to Counting in a while loop: The script initializes variable counter to 0. Then, in the while loop action, each and every time the user successfully enter a number, th

Referring to and Showing Cell Array Elements and Attributes: Just as with the other vectors, we can refer to individual elements of the cell arrays. The only difference is tha

Illustration of Passing arguments to functions: Here is an illustration of calling this function: >> printrand() The random # is 0.94 As nothing is passed to

Algorithm for subfunction: The algorithm for subfunction askforn is as shown:  Prompt the user for the positive integer n.  Loop to print an error message and reprom

Initializing the data structure - Function: Function is shown as:   >> printcylvols(cyls) Cylinder x has a volume of 169.6 Cylinder a has a volume of 100.5