This repository has been archived on 2021-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
scientificComputing/programming/exercises/myfactorial.m
2017-01-19 12:09:00 +01:00

8 lines
98 B
Matlab

function x = myfactorial(n)
% return the factorial of n
x = 1;
for i = 1:n
x = x * i;
end
end