Re: interpolation problem
- From: "Catherine Noble" <cnoble@xxxxxxxx>
- Date: Wed, 31 Aug 2005 07:14:16 -0400
interp is a matlab program. I believe you have to add in the "signal
processing toolbox" and then you will have it. Lorenz is a
handwritten program. I just want to interpolate a vector that I feed
in and get out a smooth curve.
Matlab's description of interp is:
INTERP Resample data at a higher rate using lowpass interpolation.
Y = INTERP(X,R) resamples the sequence in vector X at R times
the original sample rate. The resulting resampled vector Y is
R times longer, LENGTH(Y) = R*LENGTH(X).
A symmetric filter, B, allows the original data to pass through
unchanged and interpolates between so that the mean square error
between them and their ideal values is minimized.
Y = INTERP(X,R,L,CUTOFF) allows specification of arguments
L and CUTOFF which otherwise default to 4 and .5 respectively.
2*L is the number of original sample values used to perform the
interpolation. Ideally L should be less than or equal to 10.
The length of B is 2*L*R+1. The signal is assumed to be band
limited with cutoff frequency 0 < CUTOFF <= 1.0.
[Y,B] = INTERP(X,R,L,CUTOFF) returns the coefficients of the
interpolation filter B.
John D'Errico wrote:
>
>
> In article <ef12928.-1@xxxxxxxxxxxxxxxx>,
> "Catherine Noble" <cnoble@xxxxxxxx> wrote:
>
>> I have run into problems with the interp function in matlab. I
>> generate a prbs sequence and then generate a fixed lorentzian.
I
>> then sum the prbs multiplied by the lorentzian and then use the
>> interp function to generate the output sequence. so
>> y_interp=interp(lorenz,16) because he over sampling factor is
16.
>> The plot of this however does not result in a smooth up,down
> pulse,
>> but rather there are discontinuities at every 16 space. How do
I
> get
>> rid of these bumps? Has anyone encountered this before? Is this
a
>> problem with the interp function or something else?
>
>
> It would help if you would tell us more about what you
> are doing. An accurate description of your problem is
> valuable.
>
> lorentz.m does not appear when I search for it in matlab,
> nor does interp.m. They did not even show up on the
> web site. (Lorentz.m does appear as one member of a
> file exchange compilation.) Maybe lorentz is a variable.
>
> Where do these files come from, and what do they do?
> (Yes, I can make a rough guess what interp does. But
> does it use spline interpolation? Linear? Polynomial?
> What?)
>
> Next, you talk about discontinuities, but then you call
> them bumps. Is this oscillatory behavior from a spline
> interpolation perhaps? Pchip is sometimes a better
> choice for interpolating than is a standard spline.
> It won't give you those "bumps".
>
> Or maybe I'll hazard a guess that interp does high order
> polynomial interpolation of a Lorentzian function - a
> classic "no no". It will generate massive oscillations.
>
> The crystal ball is cloudy today. Perhaps this is due
> to hurricane Katrina.
>
> HTH,
> John D'Errico
>
>
> --
> The best material model of a cat is another, or
> preferably the same, cat.
> A. Rosenblueth, Philosophy of Science, 1945
>
.
- Follow-Ups:
- Re: interpolation problem
- From: John D'Errico
- Re: interpolation problem
- References:
- interpolation problem
- From: Catherine Noble
- Re: interpolation problem
- From: John D'Errico
- interpolation problem
- Prev by Date: Re: patch transparency workaround in R14sp2
- Next by Date: Re: What exactly does the Fourier Transform do?
- Previous by thread: Re: interpolation problem
- Next by thread: Re: interpolation problem
- Index(es):
Relevant Pages
|