⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 triu.m

📁 Interval Arithmetic Toolbox for Matlab
💻 M
字号:
function u = triu(a,k)

%TRIU (interval) implements triu for interval matrices.
%
%b4m - datatype interval    Version 1.02    (c) 26.2.1998 Jens Zemke
%
%   DESCRIPTION:
%     'triu' is called
%
%         U = triu(A)
%
%     with an interval matrix A and generates
%     the interval matrix U which is the upper
%     triangular part of A or
%
%         U = triu(A,k)
%
%     and extracts the upper interval matrix U
%     beginning with the k-th diagonal of A.
%
%     The operations on the datatype interval
%     are based on BIAS by Olaf Knueppel.
%
%   SEE ALSO:
%     interval: tril, diag.
%     double: triu.

if nargin == 1
   k = 0;
end;

if isa(k, 'struct')
   error('Function ''triu'' not defined for variables of class ''struct''.');
elseif isa(k, 'cell')
   error('Conversion to double from cell is not possible.');
elseif ~isa(k, 'double')
   error('Second argument must be of class ''double''.');
end;

[s,f] = warning;

if prod(size(k)) ~= 1
   warning on;
   warning('K-th diagonal input must be an integer scalar.');
   warning off;
end;

u = interval(triu(inf(a),k), triu(sup(a),k));

warning(s);
warning(f);

⌨️ 快捷键说明

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