"Steven_Lord" <slord@mathworks.com> wrote in message <kbr5g3$26g$1@newscl01ah.mathworks.com>...
>
>
> "dpb" <none@non.net> wrote in message news:kbl55f$d1g$1@speranza.aioe.org...
> > On 12/28/2012 3:35 PM, maryam wrote:
> > ...
> >
> >>> Here is a simple code, that Matlab wouldnt run it:
> >>>
> > ...
> >
> >>> I didnt know how to round d vector?
> >>> And how could I interpolate rows of s matrix?
> >>>
> >>> I would really appreciate your kind help
> >> ------------------
> >> One thing I forgot, after interpolation we shift its value to nearest
> >> element
> >
> > This is getting more, not less confusing all the time...I have no idea
> > what the last is intended...
> >
> > Again, give a _small_ dataset and a desired result and a rule for how you
> > got the result from the input. Giving non-working code for an
> > ill-specified problem is of no help in explaining a desired algorithm.
>
> I'm going to make dpb's request more specific. For this specific matrix:
>
> A = [1, 2, 4; 7, 12, 22; 8, 19, 45]
>
> What EXACTLY do you want the result of the interpolation you described to
> be? If possible also show the steps/calculations you'd perform to obtain
> that result if you had to perform the interpolation using pencil and paper.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com
---------------------------
thanks a lot for your reply
A = [1, 2, 4; 7, 12, 22; 8, 19, 45; 50 -1+j 3 0] & d = [1.1718 +0.7365 -1.6971 -0.9855]
I want to add elements of d to A indices:
b=[A(1,1+1.1718) A(1,2+1.1718) A(1,3+1.1718);
A(2,1+0.7365) A(2,2+0.7365) A(2,3+0.7365);
A(3,1-1.6971) A(3,2-1.6971) A(3,3-1.6971);
A(4,1-0.9855) A(4,2-0.9855) A(4,3-0.9855)]
as is clear d elements aren't integer, I want the distance between two A elements divided into sixteen parts and is interpolated using truncated sinc.
after interpolation the values is shifted to nearest neighborhood
I mean b(2,2)=A(2,2.7365)=c(2,3) & b(1,1)=A(1,1.1718)=c(1,1)
best regards
>
>
> "dpb" <none@non.net> wrote in message news:kbl55f$d1g$1@speranza.aioe.org...
> > On 12/28/2012 3:35 PM, maryam wrote:
> > ...
> >
> >>> Here is a simple code, that Matlab wouldnt run it:
> >>>
> > ...
> >
> >>> I didnt know how to round d vector?
> >>> And how could I interpolate rows of s matrix?
> >>>
> >>> I would really appreciate your kind help
> >> ------------------
> >> One thing I forgot, after interpolation we shift its value to nearest
> >> element
> >
> > This is getting more, not less confusing all the time...I have no idea
> > what the last is intended...
> >
> > Again, give a _small_ dataset and a desired result and a rule for how you
> > got the result from the input. Giving non-working code for an
> > ill-specified problem is of no help in explaining a desired algorithm.
>
> I'm going to make dpb's request more specific. For this specific matrix:
>
> A = [1, 2, 4; 7, 12, 22; 8, 19, 45]
>
> What EXACTLY do you want the result of the interpolation you described to
> be? If possible also show the steps/calculations you'd perform to obtain
> that result if you had to perform the interpolation using pencil and paper.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com
---------------------------
thanks a lot for your reply
A = [1, 2, 4; 7, 12, 22; 8, 19, 45; 50 -1+j 3 0] & d = [1.1718 +0.7365 -1.6971 -0.9855]
I want to add elements of d to A indices:
b=[A(1,1+1.1718) A(1,2+1.1718) A(1,3+1.1718);
A(2,1+0.7365) A(2,2+0.7365) A(2,3+0.7365);
A(3,1-1.6971) A(3,2-1.6971) A(3,3-1.6971);
A(4,1-0.9855) A(4,2-0.9855) A(4,3-0.9855)]
as is clear d elements aren't integer, I want the distance between two A elements divided into sixteen parts and is interpolated using truncated sinc.
after interpolation the values is shifted to nearest neighborhood
I mean b(2,2)=A(2,2.7365)=c(2,3) & b(1,1)=A(1,1.1718)=c(1,1)
best regards