Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: looking for an index and value in array
Date: Mon, 1 Dec 2008 16:11:02 +0000 (UTC)
Organization: University of Applied Sciences Regensburg FH
Lines: 6
Message-ID: <gh12am$kqi$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228147862 21330 172.30.248.37 (1 Dec 2008 16:11:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Dec 2008 16:11:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 842284
Xref: news.mathworks.com comp.soft-sys.matlab:504135


Dear All,
if c=[1 1 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 1 1 1 1]
how i can count no.of 1's between zeros. So i need to calculate numbers of 1's before a value zero and index of last 1 just before zero.
thanks
regards