bugGNU Octave - Bugs: bug #29428, Sorry, I think there's something...

 
 

bug #29428: Sorry, I think there's something wrong with function sort

Submitted by:  None
Submitted on:  Sat 03 Apr 2010 04:37:07 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 03 Apr 2010 08:39:51 AM UTC, comment #2:

I'm very sorry for My misunderstanding in Octave.
Thanks very much.

Anonymous
Sat 03 Apr 2010 04:51:15 AM UTC, comment #1:

Indexes in Octave and Matlab are 1-based not 0-based. So a(1) is actually the first element of the list, not the second.

> a(1)

ans = 4.6839

I'm not sure what you mean by the No. 1. The rank list says that the largest value is a(11).

> a(rank)


is identical to r

Judd Storrs <judd>
Sat 03 Apr 2010 04:37:07 AM UTC, original submission:

Just like this, when I type these commands:

a=[4.6839 4.5000 4.4464 4.3036 4.5357 4.4375 4.6429 3.0795 4.4143 3.9616 4.9196 3.7170 4.1420 4.2616 3.1321 4.1804 4.3063];

[r,rank]=sort(a,'descend')

it shows,
r =

4.9196 4.6839 4.6429 4.5357 4.5000 4.4464 4.4375 4.4143 4.3063 4.3036 4.2616 4.1804 4.1420 3.9616 3.7170 3.1321 3.0795

rank =

11 1 7 5 2 3 6 9 17 4 14 16 13 10 12 15 8

the No.1 it shows in rank match along with 4.5000 in a, but I think the No.1 should be 4.9196. Perhaps this is a bug.
Please check this, thanks;
(sorry for my bad English)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by judd (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 03 Apr 2010 06:05:45 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1