n*(n-1)!,因此前面的階乘函式可. 以改成遞迴式的寫法:. >> type fact2.m function output = fact2(n). % FACT Calculate factorial of a given positive integer.
確定! 回上一頁