Search All of the Math Forum:

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

Topic: finding interpolated elements between 2 arrays
Replies: 6   Last Post: Mar 20, 2013 9:40 AM

 Messages: [ Previous | Next ]
 Jonathan W Smith Posts: 90 Registered: 12/17/10
Re: finding interpolated elements between 2 arrays
Posted: Mar 20, 2013 8:31 AM

dpb <none@non.net> wrote in message <kibers\$n1j\$1@speranza.aioe.org>...
> On 3/19/2013 10:16 PM, Jonathan W Smith wrote:
> > dpb <none@non.net> wrote in message <kias80\$gik\$1@speranza.aioe.org>...
> >> On 3/19/2013 5:44 PM, Jonathan W Smith wrote:
> >> ...
> >>

> >> >
> >> > Another way to look at it is the following if
> >> >
> >> > A(1,2,:) = [900, 800, 700, 600, 500] and B(1,2,:) = [823, 689, 558] ,
> >> > how do I find the elements given in B in A?
> >> >

> >> ...
> >>
> >> Maybe so, but I don't see it, however I look. "The elements given in B
> >> in A" aren't...
> >>
> >> What result do you want and show how you get it from the above...

> >
> > I want to show an array C Where C(1,2,:) = [900, 823, 800, 700, 689,
> > 600, 558, 500]. Would this be an interpolation> If I were to plot this,
> > I would want to see values spaced out exponentially from each other.

>
> That's simply concatenating the two and sorting...
>
> C=sort([A(1,2,:) B(1,2,:)],1,'descend');
>
> How they would be plotted would depend on the independent variable
> values you chose to plot them against. If they're given for both A and
> B, one would presume the same ordering would hold for them as well.
>
> --

This is helpful. Thanks. Would one be able to do this for the 3rd dimension across the entire array at once:

C = sort([A B], 3, 'descend') ?

Date Subject Author
3/19/13 Jonathan W Smith
3/19/13 dpb
3/19/13 Jonathan W Smith
3/20/13 dpb
3/20/13 Jonathan W Smith
3/20/13 Bruno Luong
3/20/13 dpb