sqrt.m

来自「Interval Arithmetic Toolbox for Matlab」· M 代码 · 共 32 行

M
32
字号
function y = sqrt(x)

%SQRT (interval) implements sqrt for intervals.
%
%b4m - datatype interval    Version 1.02    (c) 26.2.1998 Jens Zemke
%
%   DESCRIPTION:
%     'sqrt' is called
%
%         y = sqrt(x)
%
%     and computes the elementwise square root
%     of a given interval matrix x.
%
%     The operations on the datatype interval
%     are based on BIAS by Olaf Knueppel.
%
%   SEE ALSO:
%     interval: sqr, mpower.
%     double: sqrt.

y.val = bias_sqrt(x.val);

%  bias_sqrt can only return an error (as character string)
%  or the right value (as field of double)

if isa(y.val, 'char')
   error(y.val);
else
   y = class(y, 'interval');
end

⌨️ 快捷键说明

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