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
Hello! How to cipher on Matlab the message consisting eight symbols. At first the message shares on blocks. Then in each of blocks shift of symbols is carried out. The initial text

Savannah says that the least common multiple of 4 and 6 is 24. Is she right or what is her mistake?

Example of Hold and legend function: Running this script will generate two individual figure windows. If there is not any other active figure window, the first, that is the ba

The Format Function and ellipsis: The default in MATLAB is to show numbers which have decimal places with four decimal places. The format command can be used to identify the o

Write a function that solves a system of linear equations or calculates the inverse of a matrix by Gauss-Jordan elimination. Your function should accept a matrix as an argument and

Reading from a File: A file has been once created; it can be read into a matrix variable. When the file is a data file, the load function will read from the file filename.ext

There are many approaches to numerically estimating the derivative of the function.  The relationship:   is called a forward difference, since the estimate of the derivativ

Complete assignment as per attached word doc. Include function files along with Matlab assignment file.

Creating matrix variables- arguments: The CAT arguments dimensions are not reliable. The Iterators can also be used for the values on the rows by using the colon operator;

Mathematical operation: For numerical operands, the use of such operators is clear-cut. For illustration, 3 >> 3 ans = 1 >> 9 ans = 0 Though, in the Wo