octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should interp1.m function allow jumps in X-values?


From: Ben Abbott
Subject: Re: Should interp1.m function allow jumps in X-values?
Date: Tue, 21 Aug 2012 20:05:18 -0400

On Aug 21, 2012, at 8:01 PM, Michael D Godfrey wrote:

> On 08/21/2012 07:50 PM, Ben Abbott wrote:
>>      X = [ 2 1 3 2];
>>      Y = [ 2 1 3 10];
>>      [X, n] = sort (X, "descend")
>> 
> Did you really mean to only sort X?  It seems to
> me that both X and Y should be sorted using the same
> option.  Does this work?  I do not see how it could different
> than your option for -right or -left.
> 
> But, again this is an argument of leaving the code as it is
> until it is better understood and documented.
> 
> Michael

I sorted both.  The Y(n) part was further down.

>       X = [ 2 1 3 2];
>       Y = [ 2 1 3 10];
>       [X, n] = sort (X, "descend")
> 
> X =   3   2   2   1
> n =   3   1   4   2
> 
>       Y = Y(n)


Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]