?? double.m
字號:
function d=double(c);
% COMPONENTS/DOUBLE converts a Components object into a double matrix
% Usage:
% d=double(c);
%
% Parameters:
% c: the Components object to convert
%
% Note:
% This function will give an 'hht:unequal' error if 'dt's are not equal.
% Kenneth C. Arnold <kca5@cornell.edu> 2004-07-30
% Ensure that 'dt's are the same for each component; otherwise, the
% component is not exactly representable within a double matrix.
dt = get(c,'dt');
nc = get(c,'nc');
for i=1:nc
if get(c,'dt',i) ~= dt
error('hht:unequal', 'delta-t unequal in Components object.');
end
end
% preallocate matrix
d = zeros(get(c,'npts'),nc);
% store
for i=1:nc
s = c.d(i).stime - c.stime;
e = c.d(i).etime - c.stime;
d(fix(s/dt)+1:fix(e/dt)+1,i) = c.d(i).c;
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -