# Upsampling or downsampling sample data of two sensors to match

**URL:** <https://discourse.julialang.org/t/upsampling-or-downsampling-sample-data-of-two-sensors-to-match/58937>\
**Category:** Signal and Image Processing\
**Tags:** question, dsp\
**Created:** [April 9, 2021, 6:37pm UTC](https://discourse.julialang.org/t/upsampling-or-downsampling-sample-data-of-two-sensors-to-match/58937 "2021-04-09T18:37:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eggy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eggy/32/23868_2.png) [@Eggy](https://discourse.julialang.org/u/Eggy)\
**Post date:** [April 9, 2021, 6:37pm UTC](https://discourse.julialang.org/t/upsampling-or-downsampling-sample-data-of-two-sensors-to-match/58937/1 "2021-04-09T18:37:01Z")

</div>

I used two accelerometers to collect data, but forgot to check and put them at the same sample rate; they went back to their defaults. One was sampling at 256 Hz and the other was sampling at 100 Hz. I am looking for frequencies in the 2 to 15 Hz range.

Is there a way to upsample the 100 Hz data or downsample the 256 Hz data in Julia?

The sample periods are 1 second.

Thank you!

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 9, 2021, 7:09pm UTC](https://discourse.julialang.org/t/upsampling-or-downsampling-sample-data-of-two-sensors-to-match/58937/2 "2021-04-09T19:09:07Z")

</div>

Try DSP.jl [resample](https://docs.juliadsp.org/latest/filters/#DSP.Filters.resample).

---

<div class="post-metadata">

**Author:** ![Eggy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eggy/32/23868_2.png) [@Eggy](https://discourse.julialang.org/u/Eggy)\
**Post date:** [April 9, 2021, 7:43pm UTC](https://discourse.julialang.org/t/upsampling-or-downsampling-sample-data-of-two-sensors-to-match/58937/3 "2021-04-09T19:43:18Z")

</div>

Worked like a charm, and the default Kaiser window fit the impulse well. Thanks!
