Generates sin or cos wave using plot functions, MATLAB Programming

Generates sin or cos wave using plot functions:

The script generates an x vector; iterating through all the values from 0 to 2*π in steps of 2*π /40 gives sufficient points to get a fine graph. It then finds the sine of each x value, and plots these points by using red o's. The command holds on freezes this in the figure window so the later plot will be superimposed. After that, it finds the cosine of each x value and plots these points by using blue +'s. The legend function generates a legend; the first string is paired with the first plot, and the next string with the next plot. Running this script generates the plot seen in the figure as shown below:

1822_Generates sin or cos wave using plot functions.png

Posted Date: 10/18/2012 7:07:29 AM | Location : United States







Related Discussions:- Generates sin or cos wave using plot functions, Assignment Help, Ask Question on Generates sin or cos wave using plot functions, Get Answer, Expert's Help, Generates sin or cos wave using plot functions Discussions

Write discussion on Generates sin or cos wave using plot functions
Your posts are moderated
Related Questions
I have couple questions in MATLAB I need help in

Common form of a function definition: The common form of a function definition for a function which computes and returns one value looks like this: For illustration, t

illustration of for loop: illustration, to print a column of numbers from 1 to 5: for i = 1:5 fprintf('%d\n',i) end   This loop can be entered in the Command Wi

2)''dbcont'' command for debugging is used to Select one: a. Continue normal code execution from the debug prompt. b. List all breakpoints. c. Execute (step) one or more lines

Functions with Local Variables: The functions we have seen faraway have been very easy. Though, in many situations the computations in a function are more complex, and may nee

I need assistance in learning on how to do simulation of system described with an algebraic equations.

Obtaining the Partial Fraction Expansion of the Z-Transform expression and to find its Inverse Z-Transforms using MATLAB

can we use regression in bioinformatics toolbox?

would you please send the programing code simultion

I am trying to implement this equation u_t=-\u_x\ using upwind scheme. and as a second step, I need to put some stopping function g(h) where u_t=-g(h)\u_x\ how can I write this on