📄 subsref.m
字号:
function b = subsref(ipd,index)
% IPDOUBLE/SUBSREF Support Matlab subscript references.
%
% This function supports subscript references just like Matlab matrices.
%
% Example:
% ipd = ipdouble(cumsum(ones(5,1)));
% ipd([2 4])
% ipd(3:end)
if (length(index) > 1)
error('Indexing operation not supported');
end;
if (strcmp(index.type,'()'))
b = subsref(ipd.a,index);
elseif (strcmp(index.type,'.'))
try
a = 1;
a.a;
catch
rethrow(lasterr);
end;
elseif (strcmp(index.type,'{}'))
try
a = 1;
a{1};
catch
rethrow(lasterr);
end;
else
error('Unsupported');
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -