Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started