help-octave
[Top][All Lists]
Advanced

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

Re: sortcom


From: Marius Schamschula
Subject: Re: sortcom
Date: Mon, 22 Apr 2013 10:55:51 -0500

Urs,

On Mon, Apr 22, 2013 at 10:23 AM, Urs Hackstein <address@hidden> wrote:

Dear list,

let x be a vector of complex numbers. I want to sort these complex numbers by its real parts, i.e. as -2+32*i, -1+3*i,2+30*i, .... for example.
sort(x) however sorts complex numbers by its absolute value and sort(real(x)) gives -2,-1,1,... I found a program called sortcom online http://lasp.colorado.edu/cism/CISM_DX/code/CISM_DX-0.50/required_packages/octave/share/octave/2.1.50/m/control/util/sortcom.m which claims to do the desired issue.
However, I still receive two errors if I try to run it:
In line 74, it callsĀ  create_set what is deprecated and can be changed to unique.
In line 75, I receive the following error:
error: sortcom: mx_el_eq: nonconformant arguments (op1 is 7x1, op2 is 2x1)
Can these errors be fixed or is there another way to sort the vector in the desired way?
Thanks a lot in advance.

As a member of the CISM_DX team, let me point out that you are looking at a very old CISM_DX release (0.50 is from 2004). The script was part of version of Octave 2.1.50 included in that release.

Marius

--
Marius Schamschula

reply via email to

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