binomial.m

来自「多小波分析源码」· M 代码 · 共 36 行

M
36
字号
function b = binomial(m,n)% BINOMIAL --  binomial coefficient% %        b = binomial(m,n)%        % Calculates the binomial coefficient%%            (m)      m!%            (n) = ---------%                  n! (m-n)!% % m and n can be vectors or matrices, as long as one of them is a% scalar, or they are both the same size.%% Examples:%                               (5) (6) (7)%        binomial([5,6,7],2) = [(2),(2),(2)]%%                               (5) (5) (5) %        binomial(5,[1,2,3]) = [(1),(2),(3)]%%                                     (5) (6) (7) %        binomial([5,6,7],[1,2,3]) = [(1),(2),(3)]% Copyright (c) 2004 by Fritz Keinert (keinert@iastate.edu),% Dept. of Mathematics, Iowa State University, Ames, IA 50011.% This software may be freely used and distributed for non-commercial% purposes, provided this copyright statement is preserved, and% appropriate credit for its use is given.%% Last update: Feb 20, 2004b = factorial(m) ./ (factorial(n) .* factorial(m-n));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?