Clear Filters
Clear Filters

dynamic time warp matlab economic data

1 view (last 30 days)
I would like to apply the dynamic time warp in economic data of capb i calculated and imf capb. How to code the dynamic time warp in matlab using the two time seriese data.

Answers (1)

Walter Roberson
Walter Roberson on 23 May 2022
Signal processing toolbox, dtw
  1 Comment
Eugene Msizi Buthelezi
Eugene Msizi Buthelezi on 23 May 2022
Good Day
I am trying to apply the DTW, i have tWo economic varaibles name, [tvp_elstcy_CAPB and capb_imf1], years1, it a time series fron 1979 to 2020 it not balanced, can am not able to apply DTW code below what is that am doing wrong i have atteched files as well.
% DTW & CDTW example
% Sinusoidal signals temporal alignment
clear all
close all
load matlab.mat
%f1=1; A1=1;
%f2=5; A2=0.8;
%tvp_elstcy_CAPB=A1*sin(2*pi*f1*years1)+n1; % 1st sinusoid with noise addition
%capb_imf1=A2*sin(2*pi*f2*years1)+n2; % 2nd sinusoid with noise addition
figure; hold on;
xlabel('time (s)');
ylabel('amplitude (mV)');
title('Original disaligned waves');
dtw_Dist, dtw_k
cdtw_Dist, cdtw_k

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!