?? beta.m
字號:
function y = beta(z,w,v)
%BETA Beta function.
% Y = BETA(Z,W) computes the beta function for corresponding
% elements of Z and W. The beta function is defined as
%
% beta(z,w) = integral from 0 to 1 of t.^(z-1) .* (1-t).^(w-1) dt.
%
% The arrays Z and W must be real and nonnegative. Both arrays must be
% the same size, or either can be scalar.
%
% Class support for inputs Z,W:
% float: double, single
%
% See also BETAINC, BETALN.
% Ref: Abramowitz & Stegun, Handbook of Mathematical Functions, sec. 6.2.
% Copyright 1984-2004 The MathWorks, Inc.
% $Revision: 5.10.4.3 $ $Date: 2004/12/06 16:36:20 $
if nargin<2,
error('MATLAB:beta:NotEnoughInputs', 'Not enough input arguments.');
elseif nargin == 2
y = exp(gammaln(z)+gammaln(w)-gammaln(z+w));
elseif nargin == 3
warning('MATLAB:beta:ObsoleteUsage',['This usage of BETA(X,Z,W) is ' ...
'obsolete and will be eliminated\n in future versions.' ...
' Please use BETAINC(X,Z,W) instead.']);
y = betainc(z,w,v);
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -