How to calculate time delay coordinates?
3 次查看(过去 30 天)
显示 更早的评论
i want to know the way to calculate the time delay coordinates.
I made it .
But, if the number of dimensions to be embedded increases, the calculation becomes impossible. The size of the array will change.
If the variable 'embed_dime' is increased, it cannot be calculated. Some data in the delayed coordinate system will be erased without permission. How should I fix it? Also, is it correct as a calculation of time-lag coordinates?
clear all;
close all;
%% loar trajectory data from mat.file
load('trajectory.mat')
X = [x1;x2]; % 968×1
Y = [y1;y2];
%% parameter
embed_dime = 15; % embed dimention
delta = 0.2; % time delay
Deley_X = get_delay_vector(X,embed_dime,delta);
Deley_Y = get_delay_vector(Y,embed_dime,delta);
%% caluculate time delay coodinates
for i=1:embed_dime
X_D = X + Deley_X;
Y_D = Y + Deley_Y;
end
function Y=get_delay_vector(data,embed_dimen,delta)
data_size=size(data); % data size
%% transform to row vector
if data_size(1)<data_size(2)
data=data';
end
data_size=size(data);
Z=zeros(data_size(1),embed_dimen-1); % make 0 vector size = data × 1
%% data shift
for i=1:embed_dimen-1
%Z(:,i)=circshift(data,[(i-1)*delta,0]);
Z(:,i) = i*delta;
end
%% calculate time delay matrix
Y=Z(delta*embed_dimen-1:end,:);
end
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!