Question: MATLAB question: 3. (8 points) Write a MATLAB function (myFactorial.m) that computes and returns the factorial of a single number (a scalar) or a vector

MATLAB question:

MATLAB question: 3. (8 points) Write a MATLAB function (myFactorial.m) that computes

3. (8 points) Write a MATLAB function (myFactorial.m) that computes and returns the factorial of a single number (a scalar) or a vector of numbers. In your function code, do not use MATLAB's factorial function. Include help documentation. Your myFactorial function must behave as shown below, with your student information where indicated. User input is underlined. >> help myFactorial myFactorial - compute and return the factorial of num myFactorial (num) returns the factorial of num, where num is a scalar or a vector of numbers. Note: This function does *not* use MATLAB's factorial function. Author: , , >> my Factorial (12) ans = 479001600 >> my Factorial (0) ans = >> myFactorial (1:6) ans = 1 2 6 24 120 720

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!