Now I'm trying to learn MATLAB ; I tried a simple step, factorial function.
factorial.m :
function result = factorial (m) if m == 1 result = m; else result = m .* factorial(m.-1); end
and then call it like this:
x = 2; f = factorial (x)
but all i get is error:
Missing variable or function.
source share