# How to calculate time delay coordinates？

5 views (last 30 days)
ryunosuke tazawa on 24 Feb 2022
i want to know the way to calculate the time delay coordinates.
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
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
Arrays have incompatible sizes for this operation.
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

### Categories

Find more on Flight Parameters and Quaternion Math in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by