changing the reference sequence in DTW

Hello everyone, I wanted to use Dynamic Time Warping to align one sequence with respect to the reference one (the time series are stretched or compressed). But, when using the command “dtw” in MATLAB, after finding the optimal path, both time series are stretched. Let me give you an example: the reference is x1 = [1 1 1 2 2 4 4 2 1 1 ], with 10 points (length=10), and the other sequence is x2 = [1 2 2 3 3 2 2 1 1], with 9 points. In addition, the warping path has 11 points, therefore, when MATLAB plot the aligning data show me two plots (in one figure) with 11 points.

But, I don’t want my reference signal to stretch. I would really appreciate it if you help me to align x2 with respect to the reference signal without changing the reference signal. It is worth to note that as the procedure of DTW shows, the boundaries of warping path is “max(length(x1) and length(x2))

1 Comments
 
Most Helpful

Nihil et ut qui dolore et autem. Qui enim veritatis amet. Voluptatum consequatur in nihil sint est quis. Qui ipsa nobis et quia vel qui magnam magnam. Laborum suscipit quia beatae optio eos qui veritatis labore.

Neque fuga sit officia dolores ipsam. Fugiat magni aspernatur dolore et. Qui ea maiores enim in sequi maxime. Nihil quidem consequatur rerum voluptas odio. Facere aliquam voluptas ut velit dolor.

Sapiente voluptate velit ut dicta eius sit doloremque. Perferendis sit ipsam ut.

Career Advancement Opportunities

June 2026 Hedge Fund

  • Point72 99.0%
  • D.E. Shaw 98.1%
  • AQR Capital Management 97.1%
  • Citadel Investment Group 96.1%
  • Magnetar Capital 95.1%

Overall Employee Satisfaction

June 2026 Hedge Fund

  • Magnetar Capital 99.0%
  • D.E. Shaw 98.0%
  • Blackstone Group 97.0%
  • Citadel Investment Group 96.0%
  • Millennium Partners 95.0%

Professional Growth Opportunities

June 2026 Hedge Fund

  • AQR Capital Management 99.0%
  • Point72 98.1%
  • D.E. Shaw 97.1%
  • Citadel Investment Group 96.2%
  • Magnetar Capital 95.2%

Total Avg Compensation

June 2026 Hedge Fund

  • Portfolio Manager (9) $1,648
  • Vice President (27) $464
  • Director/MD (12) $423
  • NA (9) $320
  • Engineer/Quant (86) $288
  • 3rd+ Year Associate (26) $284
  • Manager (4) $282
  • 2nd Year Associate (32) $253
  • 1st Year Associate (77) $191
  • Analysts (242) $181
  • Intern/Summer Associate (29) $145
  • Junior Trader (5) $102
  • Intern/Summer Analyst (282) $96
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
BankonBanking's picture
BankonBanking
99.0
3
Secyh62's picture
Secyh62
99.0
4
kanon's picture
kanon
99.0
5
GameTheory's picture
GameTheory
98.9
6
DrApeman's picture
DrApeman
98.9
7
CompBanker's picture
CompBanker
98.9
8
dosk17's picture
dosk17
98.9
9
Betsy Massar's picture
Betsy Massar
98.9
10
Jamoldo's picture
Jamoldo
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”