octave-maintainers
[Top][All Lists]
Advanced

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

permute of a scalar


From: John W. Eaton
Subject: permute of a scalar
Date: Thu, 22 Apr 2004 12:47:15 -0500

On 22-Apr-2004, David Bateman <address@hidden> wrote:

| If 
| 
| a=1; b = a'; 
| 
| is legal, then I think so should be
| 
| a=1; permute(a,[2,1]);
| 
| that effectively does the same thing. However, as permute is not
| defined for scalar values we get a gripe_wrong_type_arg. The patch
| below adds the permute function for scalars. However, it doesn't check
| the validity of the arguments and just returns the scalar value
| itself. The Matlab version does check the indexing vector when called
| with scalars, but this doesn't make all that much sense.

OK, I applied this patch.

Thanks,

jwe



reply via email to

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