?? timeshft.m
字號:
function [out]=timeshft(in,d)
%
% Time shift a data matrix
%
% [out]=timeshft(in,d);
%
% out - timeshifted data
% in - non-shifted data
% d - matrix of time delays
%
[D L]=size(in);
%
% Find the maximum time delay.
% This defines where the new
% data matrix starts
%
max_delay=max(d);
start_pos=max_delay+1;
new_len=D-start_pos;
out=[];
for i = 1 : L
s=start_pos-d(i);
f=s+new_len;
temp=in(s:f,i);
out(:,i)=temp;
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -