Plotting from a function, MATLAB in Engineering

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 an input argument to the function, as in a cell array with the plot type names. The function creates the Figure Window by using the cell array with the plot type names. It generates a function handle for each using the str2func function.

313_Plotting from a Function.png

980_Plotting from a Function1.png

1865_Plotting from a Function2.png

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







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

Write discussion on Plotting from a function
Your posts are moderated
Related Questions

. Generate the following signal, x(n)=1+cos((25*pi*n)/100),0 Compute the DTFT of x[n] for w=0:0.01:2*pi Plot the Real part, imaginary part, the amplitude and phas

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

Polyhedron - graphics objects: The field polyhedron.vertices is a matrix in which each row presents (x,y,z) points. The field polyhedron.faces defines the faces: for illustrat

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

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

Program of passing arguments to functions: This was an illustration of a function which did not receive any input arguments nor did it return any output arguments; it easily a

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.

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)

Creating a cell array: The other method of creating a cell array is easy to assign values to particular array elements and build it up element by element. Though, as explained