#### hudla

##### Newbie level 1

- Joined
- Aug 3, 2003

- Messages
- 1

- Helped
- 0

- Reputation
- 0

- Reaction score
- 0

- Trophy points
- 1,281

- Location
- Czech Republic

- Activity points
- 19

**matlab resample signal**

I'd like to ask about an effective ways how to arbitrarily resample very long signals (e.g. several millions of samples). My signal is a trace from oscilloscope (which has fixed sampling ferequencies, e.g. 100 MS/s, 1 GS/s, 2.5 GS/s) containing data with arbitrary symbol rate. I need to apply a root-rised cosine (RRC) filter to this signal rcosflt(x, Fd, Fs). The problem is, that the ratio Fs/Fd has to be an integer number, which is not always true for an arbitrary symbol rate. Thus I want to resample the signal in order to obtain Fs/Fd integer. I tried to use resample(x,p,q) Matlab function (Signal Process. Toolbox), but usually I need very big p, q numbers to do it.

Example: sampling frequency Fs = 100 MS/s, sample rate Fd = 5.676 MS/s, the length of signal is 2 millions of samples. Thus I need p = 100 000 and q = 5676 to resample this signal. Such ratio is impossible to calculate on an average PC for 2 megasamples long signal due to memory.

Then I thought about a piecewise-like resampling, i.e. to take lets say 1000 samples, resample them and to repeat it 2000 times. It doesn't work well, since resample function in Matlab assumes the signal to be zero at times before and after the given samples, so an amplitude error is introduced at the beginning and at the end of the resampled signal (due to filtering process). Another problem - the resampled signal is then very long, to be exact ceil(length(x)*p/q) = approx. 35 Msamples, which is really impossible to filter with rcosflt function on average PC.

Any ideas how to do it effectively and without introducing additional amplitude errors to the signal?

Thanks, Martin