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

Illustrations of calling the rand function: The function ‘rand’ can be used to produce random real numbers; calling it produces one random real number in the range from 0 to

For the 66kV subtransmission network shown below, calculate the following, using a MATLAB Simulink Power System Blockset model: 1. Three phase, phase-to-phase and phase-to-earth

how do I make a second main function?

construct a matlab program to calculate and to plot the electron and hole concentration as a function of the Fermi-level in an energy gab of Si at a Given temperature and the carri

Vectors and Matrices: The Vectors and matrices are used to store sets of values, all of which are similar type. A vector can either be a column vector or a row vector. The mat

Appending data to a data File: A text file once exists; the data can be appended to it. The format is similar as formerly, with the addition of the qualifier -append. For illu

would you please send the programing code simulation.


Characters and Encoding: A character in a MATLAB is represented by using single quotes (example, 'a' or 'x'). The quotes are essential to denote a character; without them, the