Question: Write a Matlab function ( named Myfactorial ) to calculate the factorial of a positive integer. You will use the for loop to calculate the

Write a Matlab function (named Myfactorial) to calculate the factorial of a positive integer. You
will use the for loop to calculate the factorial.
Put this function in a script file called Myfactorial script.m .
In this script :
Ask the user if they want to provide a number. Please note that the only acceptable answers are
[yes,y,no,n].
1. If they say yes (yes or y)
Calculate the factorial of that number using your own function and matlab builtin function for the factorial.
Display results from both meth

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!