help-octave
[Top][All Lists]
Advanced

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

Re: uniq like function?


From: Evan
Subject: Re: uniq like function?
Date: Sat, 17 Apr 2010 14:37:28 +0800

On Sat, Apr 17, 2010 at 12:19 AM, Judd Storrs <address@hidden> wrote:
> On Fri, Apr 16, 2010 at 11:41 AM, Sergei Steshenko <address@hidden> wrote:
>> So to which of "for', `if', `do', `while', or `function'" 'end' here
>> belongs ?
>
> Can you suggest an improved documentation string? What about this:
>
> Keyword: end
>    Mark the end of any `for', `if', `do', `while', or `function'
>    block; or the last element inside an indexing expression.
>
>
> --judd
>

I didn't know this kind of end before. 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. but octave support omitting both
the start and the end of the indexing expression at the same time,
i.e. a(:). Mentioning this, I am a little curious why a(:) and
a(1:end) are (should be?) different for row vectors. I know the former
one is frequently used to reshape matrices. Is this just an issue of
compatibility? will the reshaping with a(:) be deprecated in the
future?



reply via email to

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