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

Rules for variable names, Rules for variable names: In addition, the v...

Rules for variable names: In addition, the variable names must always be mnemonic that means they should make some sense. For illustration, if the variable is storing the radi

Simplex method, wite a function that will take In a simplex an an associate...

wite a function that will take In a simplex an an associated and return the nitial feasible solution of the tableau x as a column vector as well as the objective the objective fun

Population pyramid, I want to write a function in matlab which gives me a p...

I want to write a function in matlab which gives me a population pyramid bar chart. could you please help me do this.

Stacked bar chart, A file houseafford.dat stores on its three lines years, ...

A file houseafford.dat stores on its three lines years, median incomes and median home prices for a city. The dollar amounts are in thousands. For example, it might look like this:

If-else statement, The IF-ELSE Statement: The if statement selects whe...

The IF-ELSE Statement: The if statement selects whether an action is executed or not. Selecting between the two actions, or selecting from numerous actions, is accomplished by

Creating column vectors, Creating Column Vectors: One way to generate ...

Creating Column Vectors: One way to generate a column vector is by explicitly putting the values in square brackets, separated by the semicolons: >> c = [1; 2; 3; 4] c =

Compare performance between matlab and excel, This assignment is designed t...

This assignment is designed to compare performance between Matlab and Excel for performing nonlinear regression analysis of a set of data. There are two data sets in the accompa

Command window, Command Window: To the left of the Command Window, the...

Command Window: To the left of the Command Window, there are 2 tabs for the Current Directory Window and Workspace Window. If the Current Directory tab is selected, the files

Find and compute the natural frequencies, An electric overhead traveling cr...

An electric overhead traveling crane, consisting of a girder, trolley, and wire rope, is shown in figure. The girder has a flexural rigidity (EI) of 6x10 12 lb.in 2 and a span (L

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