Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: interpolate

$
0
0
On 12/31/2012 4:20 AM, maryam wrote:
...

> 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)

 >> ix=round(repmat([1:length(d)],4,1)+repmat(d',1,length(d)))
ix =
      2 3 4 5
      2 3 4 5
     -1 0 1 2
      0 1 2 3
 >>

is your rounded index array, do w/ it what you will...I've still no idea
what it is you're really trying to do as again you haven't followed the
seemingly simple request to work through an example as if you were doing
it on paper, step-by-step, not assuming the reader knows anything
_except_ what you write.

--

Viewing all articles
Browse latest Browse all 19628

Trending Articles