Rescale signal in x-axis

Hi, i have a short signal (only about 500 points in x-axis) and i want to rescale the x-axis but leave the y-axis as is. I need something like a time stretch method so that I can expand or shrink the signal at the x-axis by using a factor that can be a real number e.g. 2.5. If for example my signal was a sine wave then i could do: y=sin(a*t) to rescale it at the x-axis by a factor of a. But in my case there is no exact formula for the signal..Any help?

댓글 수: 3

Tobias
Tobias 2013년 4월 15일
How is your signal stored? In a vector, in a text document? If its a vector, you could just do xvalue = xvalue .* 2.5
Athanasios
Athanasios 2013년 4월 15일
Yes in a vector 1x500. So it is a one-dimensional array and if it is for example: [1 3 4 5 6 6 7 8....] it should expand to this: [1 1 3 3 4 4 5 5 6 6 7 7 8 8 ...] using a factor of 2 and accordingly when using a real number..
Athanasios
Athanasios 2013년 4월 15일
well..maybe its better to use an interpolation to get the missing cells..

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

답변 (0개)

카테고리

제품

질문:

2013년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by