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
Executing a program: Running the program would be completed by typing the name of the script; this would call the other functions: >> calcandprintarea Whenever prompt

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

Illustration of Gauss elimination: For illustration, for a 2 × 2 system, an augmented matrix be: Then, the EROs is applied to obtain the augmented matrix into an upper

Illustration of Variable scope: Running this function does not add any of variables to the workspace, as elaborated: >> clear >> who >> disp(mysum([5 9 1]))

Converting between the String and Number types: The MATLAB has many functions which convert numbers to strings in which each character element is a separate digit, and vice ve

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

Indexing into Vectors of structures: Frequently, when the data structure is a vector of structures, it is essential to iterate through the vector in order by various fields. F


Interchange rows : for illustration interchanging rows ri and rj is written as

Calling of Function polyval: The curve does not appear very smooth on this plot, but that is as there are only five points in the x vector. To estimate the temperature