📄 assign.m
字号:
function ipd = assign(ipd,y,varargin)
% IPDOUBLE/ASSIGN Assign an entire in-place double.
%
% assign(ipd,y) overwrites the contents of ipd with y. The size of ipd and
% y must match.
%
% Example:
% ipd = ipdouble(ones(5,1));
% assign(ipd,pi*ones(5,1));
if (isempty(x))
if any(size(size(ipd)) ~= size(size(y))) || ...
any(size(ipd) ~= size(y))
error('ipdouble:invalidParameter','In assign(ipd,y) size(ipd) must equal size(y).');
end;
%ipd(:) = y(:);
%ipd(1) = 5;
subs = {':'};
S = struct('type','()','subs',[]);
S.subs = subs;
subsasgn(ipd,S,y);
else
S = struct('type','()','subs',[]);
S.subs = varargin;
subsasgn(ipd,S,y);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -