Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

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

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions