Question: Using MATLAB Please Show the code to do 1-3 1. Draw graphs of the functions y=cos(x) and y=x for 0x2 on the same window. Put

Using MATLAB Please Show the code to do 1-3

Using MATLAB Please Show the code to do 1-3 1. Draw graphs

1. Draw graphs of the functions y=cos(x) and y=x for 0x2 on the same window. Put labels for x - and y - axis and title and legend for your plot. 2. Write a function called my_factorial that takes input n and calculate n Hint1: n=123n. Hint2: you should use for loop in your function. 3. The angle between two column vectors x and y is defined by cos()=xyxx Use this formula to determine write a function called my_angle and run it for calculating the cosine of the angle between x=[1,2,3] and y=[3,2,1]. Hint1: x in the formula is matrix product. Hint2: Norm of a vector in matlab is calculated as x=norm(x)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!