So I have to create a function that takes an input value and then generates it factorial using a recursive algorithm.
This is what I have so far, but I just can't seem to get it to work. any help would be great thanks
function y = FactRecur(n)for n=input('give integer ')y = n ;if n == 0 y = 1 ;else y = y * FactRecur(n-1);enddisp(y)end
Best Answer