[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uniq like function?
From: |
Judd Storrs |
Subject: |
Re: uniq like function? |
Date: |
Sat, 17 Apr 2010 12:12:50 -0400 |
On Sat, Apr 17, 2010 at 2:37 AM, Evan <address@hidden> wrote:
> I remembered that matlab seems
> support omitting the first or the last element inside indexing
> expressions when I used it many years ago, for example, a(:5), a(2:).
> these are not supported in octave.
Is this a new feature of Matlab or an old feature that has been
removed? In Matlab R2007b:
>> a = 1:10 ;
>> a(1:)
??? a(1:)
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> a(:1)
??? a(:1)
|
Error: Unexpected MATLAB expression.
I'm familiar with IDL using this sort of syntax and I've always
thought it made sense. In IDL you can even just use a negative index
e.g. a(1:-3) and it does what you would expect.
--judd
Re: uniq like function?, Olaf Till, 2010/04/16