help-octave
[Top][All Lists]
Advanced

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

Re: ordering variable


From: James Sherman Jr.
Subject: Re: ordering variable
Date: Fri, 21 Mar 2008 18:28:00 -0400

I is a vector of indices to the original vector. So something like:

V = [ 10, 40, -5, 15];
[Y, I] = sort(V);

would return:
Y = [-5 15 10 40];
I = [3 4 1 2];
which has the relationship,
Y = V(I);

Note: This was done by hand, since I don't have octave available right
now, so any typos or errors I blame on my horrible memory.

Hope this helps,
James

On Fri, Mar 21, 2008 at 6:15 PM,  <address@hidden> wrote:
>
>
> Dear James, thank you for your reply
>
> let [y,I]=sort(Z)
>
> what's the implication of I?
>
> thank you
> _______________________________________________
>  Help-octave mailing list
>  address@hidden
>  https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>


reply via email to

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