dpb
Posts:
6,853
Registered:
6/7/07
|
|
Re: finding interpolated elements between 2 arrays
Posted:
Mar 20, 2013 12:45 AM
|
|
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.
--
|
|