Generates sin or cos wave using plot functions, MATLAB Programming

Assignment Help:

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


Related Discussions:- Generates sin or cos wave using plot functions

Illustration of script, Illustration of script: For illustration, we w...

Illustration of script: For illustration, we will now generate a script known as script1.m which calculates area of the circle. It assigns a value for the radius, and then com

Beam steering, Some recent column source designs incorporate ‘beam steering...

Some recent column source designs incorporate ‘beam steering', where the phase of each element in the column is varied in order to change the angle at which the major lobe appears.

Sequence alignment and blast search, Calculating and Visualizing Sequence S...

Calculating and Visualizing Sequence Statistics Follow the instructions in this demo file to download a sequence and calculate and visualize its statistics. Save all the command

Linspace function, Linspace function: Likewise, the linspace function ...

Linspace function: Likewise, the linspace function generates a linearly spaced vector; linspace(x,y,n) generates a vector with n values in the inclusive range from x to y. For

Error-checking user input in the while loop, Error-Checking user input in t...

Error-Checking user input in the While Loop: In many applications, whenever the user is prompted to enter anything, there is a valid range of values. When the user enters a wr

Creating matrix variables- arguments , Creating matrix variables- arguments...

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;

Calculate three natural frequencies of the system, A three degree of freedo...

A three degree of freedom system is shown in Figure.  The three masses are each 1 kg and are constrained to move in the directions shown.   The three stiffnesses are   5 kN/m, 50 k

Digging the dirt - autonomous mining robots , Digging the Dirt: Autonomous...

Digging the Dirt: Autonomous Mining Robots   Mining is a multi-billion dollar industry and a critical part of the Australian economy. Much of the day-to-day work on mining sites

Write m-function that computes simple returns as formula, Your Task: Write ...

Your Task: Write an M-function that computes simple returns as formula (1). Use this function to calculate the daily returns for each index. Using MATLAB build-in functions estimat

Quadratic interpolation of temperature, Temperature readings were done ever...

Temperature readings were done every hour (starting at 1 P.M., but the end time could vary) and stored in a vector called readings. Write a function called halffit that receives th

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd