Interpolating matrices of different sizes to the same size

조회 수: 2 (최근 30일)
Ase U
Ase U 2018년 8월 15일
댓글: Pieter Hamming 2018년 8월 15일
Hello,
i have two signals and i want to equalize sizes of my signals because i try to find the time lag in between. Size of first signal is [4001 1], second is [1 180]. But i don't want to just remove some elements from first signal. It should be have almost same curve like in this photo. I think that i need something about interpolation and i tried this code but it show me just same value always, not like interpolation.
targetSize = [1 180];
signal_new = imresize(signal, targetSize);
Any idea? I am very appreciated for your answers, thank you!
  댓글 수: 3
Ase U
Ase U 2018년 8월 15일
편집: Ase U 2018년 8월 15일
thank you Pieter. But i don't get it actually. My time is not like this "18-Dec-2015 08:03:05". They are just numbers. It is Timetable?
Pieter Hamming
Pieter Hamming 2018년 8월 15일
Others have given alternatives such as interp1, but if you want to use timetable, can you give me an example of your data?

댓글을 달려면 로그인하십시오.

채택된 답변

dpb
dpb 2018년 8월 15일
See
doc resample
in Signal Processing TB

추가 답변 (1개)

Anthony Barone
Anthony Barone 2018년 8월 15일
interp1 will do what you want. I find that using it with the 'pchip' flag is particularly useful.

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by