Write a user-defined function that calculates the "double factorial" of a positive odd integer (2n

Question

Write a user-defined function that calculates the "double factorial" of a positive odd integer (2n - 1)!! = (2n - 1)(2n - 3)(2n - 5)... (3)(1). For the function name and arguments, use y=dblfact (x) where the input argument x is the odd number whose double factorial is calculated and the output y is x!!. The function should display an error message if the input is not a positive integer. Use your function to evaluate the following:



(a) 7!! (b) 25!! (c) 12!! (d)(-13)!!


*Please read and follow the directions carefully.

**Include EVERYTHING typed in the editor in Matlab

Details
Purchase An Answer Below

Have a similar question?