Path: news.mathworks.com!not-for-mail
From: "John Gar" <jonathangarzon@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: matrix operation
Date: Tue, 9 Feb 2010 10:45:05 +0000 (UTC)
Organization: JCT
Lines: 26
Message-ID: <hkrebh$d2t$1@fred.mathworks.com>
References: <hkp0jb$5am$1@fred.mathworks.com> <hkp7gj$cke$1@fred.mathworks.com>
Reply-To: "John Gar" <jonathangarzon@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1265712305 13405 172.30.248.35 (9 Feb 2010 10:45:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Feb 2010 10:45:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1224657
Xref: news.mathworks.com comp.soft-sys.matlab:605683

"Oleg Komarov" <oleg.komarovRemove.this@hotmail.it> wrote in message <hkp7gj$cke$1@fred.mathworks.com>...
> "John Gar" 
> > Hello all,
> > 
> > I need some help in a matrix operation.
> > I have a big matrix with a large number of zero rows, and other rows with some numbers. For example an [180 200], when the first 100 rows are zeros, after 5 rows with numbers, again 30 zero rows, 25 numbers rows and 20 zeros rows.
> > 
> > What I want is to take out from the big matrix to another small matrix - the 5 rows with numbers, and after that to a second small matrix the 25 rows with number.
> > (sometimes it can be more than two small matrix, depends on the original signal.)
> > 
> > Some ideas? Help?
> > 
> > thanx,
> > 
> Why don't you just remove those rows with all zeros?
> You may find useful the "matrix indexing" chapter in the online docs.
> Ex:
> A = [0,0; 0,0; 1,1];
> A(all(A == 0,2) ,:) = [];
> 
> Oleg

Hi Oleg, thanks for answering. 

The problem is, that if I remove all the zeros, how I can know the limit between each number part (from the matrix). In my case, each number part is a word sampled, and I want to divide this words.. 
Can I insert some flag to know when each part is finished??