Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

matlab Time (sec.) EXAMPLE 2: Problem: Plot the values of cos x for x=0 degrees to x=360 degrees. Program: Figure: The Trig Function Cosine -

image text in transcribed

image text in transcribed

matlab

Time (sec.) EXAMPLE 2: Problem: Plot the values of cos x for x=0 degrees to x=360 degrees. Program: Figure: The Trig Function Cosine - Example x=0:0.1:360; z=x*pi/180; y=cos (z); plot (x,y) title('The Trig Function: Cosine') xlabel('X Values in Degrees') ylabel('Cosine of X') grid - ------ - - - - Cosine of X No X - - - LLLLLL - - - - - - -- Note: Matlab calculates trig functions using radians. This example required an intermediate step to convert degrees to radians by multiplying by pi/180. - - - 300 350 100 400 150 200 250 x Values in Degrees Or, you could type: y=cos (x*pi/180); . Example 2 a. Type the commands for Example 2 (p. 4) in an m-file, save the m-file, and execute the m-file in the command window. b. Using the formulas, manually calculate the 5th value that should be found in each of the three vectors: x, z, and y. c. Add commands to the m-file to print only the 5th value from each vector - are you right? d. Publish the Example 2 m-file to a pdf document. Domnle 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions