Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!z11g2000yqz.googlegroups.com!not-for-mail
From: dclist <dclist@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Elegant hysteresis calculation help
Date: Sat, 20 Mar 2010 16:41:06 -0700 (PDT)
Organization: http://groups.google.com
Lines: 7
Message-ID: <3a7d2d38-a14f-4e46-be8b-ef62fc816390@z11g2000yqz.googlegroups.com>
References: <8f72765c-f7f1-44f6-a9ef-a4e79a0afe5b@c16g2000yqd.googlegroups.com> 
	<ho3ebn$lfm$1@fred.mathworks.com> <ho3i01$9r9$1@fred.mathworks.com>
NNTP-Posting-Host: 74.12.220.47
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1269128466 12752 127.0.0.1 (20 Mar 2010 23:41:06 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 20 Mar 2010 23:41:06 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: z11g2000yqz.googlegroups.com; posting-host=74.12.220.47; 
	posting-account=enwcMwoAAABGySPvlP4hGilnj66cOQSU
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2) 
	Gecko/20100308 Ubuntu/10.04 (lucid) Firefox/3.6,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:618633

On Mar 20, 6:25 pm, "Sadik " <sadik.h...@gmail.com> wrote:
> Here is another one:
>
> i = find(a);
> k = a(i(cumsum(a~=0)));

Thanks, very nice.