📄 factorial.m
字号:
function p = factorial(n)
%FACTORIAL Factorial function.
% Does the same as the matlab factorial function. This one is added for those
% who do not have it in their matlab installation.
if (length(n)~=1) | (fix(n) ~= n) | (n < 0)
error('N must be a positive integer');
end
p = prod(1:n);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -