📄 cdv.m
字号:
function c = cdv(varargin)
% CDV - Constructor for the class cdv, a sub class of the gen class.
% The constructor is called as follows:
%
% cdv('name',low_limit,high_limit,bits)
% 'name' - the name that identify the variable
% low_limit - the lower limit for the variable
% high_limit - the upper limit for the variable
% bits - the number of bits used to code the variable
%
% if the constructor is called without any arguments it returns an
% empty variable.
%
% See also CHROM,DDV,UI_GEN,UI_CHROM
switch nargin
case 0
c=struct('l_limit',0,'u_limit',0);
c = class(c,'cdv',gen);
case 1
if isa(v,'cdv')
c=varargin{1};
else
error('wrong argument')
end
case 4
c=struct('l_limit',varargin{2},'u_limit',varargin{3});
c=class(c,'cdv',gen(varargin{1},varargin{4}));
otherwise
error('Wrong number of arguments')
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -