Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: interpolate
Replies: 14   Last Post: Apr 9, 2015 1:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 17
Registered: 12/25/12
Re: interpolate
Posted: Dec 28, 2012 12:01 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <kbhqvf$l2s$1@speranza.aioe.org>...
> On 12/26/2012 7:45 PM, maryam wrote:
> > dpb <none@non.net> wrote in message <kbg5ol$ugl$1@speranza.aioe.org>...
> >> On 12/26/2012 5:03 PM, maryam wrote:
> >> > dpb <none@non.net> wrote in message <kbfhar$1lo$1@speranza.aioe.org>...
> ...

> >> >> doc interp1
> >> >>

> >> >> >> X = 0:10; V = sin(X); Xq = 0:.25:10;
> >> >> >> Vq = interp1(X,V,Xq);

> ...

> >> > thank you very much for your answer but I mean we have a matrix n-by-m:
> >> > assume M= [a b c;d e f; g h i]
> >> > I want to interpolate its rows so that is equal to
> >> > M=[a a+d a+2d a+3d ... 7d b b+d ... b+7d c... c+7d ; d... d+7d...

> >> f+7d ;
> >> > g ... i+7d]
> >> > Can you explain me how I could do it?

> >>
> >> I'm virtually certain you asked this same question some days ago and I
> >> told you then the same thing...
> >>
> >> Use interp1() as the above example w/ an interpolating vector of the
> >> points at which you want interpolants. Here's why I think I remember
> >> the question and the response, as I pointed out then, since interp1()
> >> works on columns you'll need to transpose, interpolate, then transpose
> >> back.
> >>
> >> I can't interpret the above [a a+d a+2d ... ) precisely but assuming d
> >> here is a different 'd' than that of the value in the original M(2,1)
> >> and is just a delta then the interpolant would seem to be
> >> linspace(0,N*d,N+1) where N is the number of intervals (7 above) added
> >> to a, b, c, ..., etc.
> >>

> ...

> > thank you so much, I'm Beginner in matlab,
> > I apologize for my request
> > Is it possible give me matlab code of my question?
> > I couldn't use 'for' command or M(:,columns) ...
> > my matrix is 1000-by-1200 d=delta=1/16
> > its values (arrays) is arbitrary here

> That's identical to the example I gave except on an array instead of a
> vector...and a still-to-be-determined precisely interpolant.
> What does the 1/16 delta refer to--is it a constant or a fraction of the
> distance between columns, or what? Your description isn't precise (or
> at least I can't decipher what it is you want clearly enough to actually
> write a piece of specific code).
> Can you give a very small example of a dataset that you could compute
> the desired result of by hand? It wouldn't have to be but one row and a
> few values to illustrate what you're actually trying to do...

Hi thank you so much for your reply
Here is a simple code, that Matlab wouldn?t run it:

ti=1.44e-4; to=1.48e-04; dt=1e-9;
for k=1:600
for k=1:600;
for r=1:m-round(max(d));

each d vector element like d(1)=12.5 includes an integer part(12) and a fractional one(0.5).
I need an interpolator to move the data an arbitrary fraction of the space between each 2 elements, this fraction is quantized to 1/16 of the space between 2 elements, so 15 different interpolators are needed to move the data by i /16 of this space, where i = 1 : 15, A simple interpolator is obtained from a truncated sinc function that the coefficients are weighted by a window like kaiser.

I didn?t know how to round d vector?
And how could I interpolate rows of s matrix?

I would really appreciate your kind help

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.