Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Take non-zero values
Date: Sun, 8 Nov 2009 17:03:01 +0000 (UTC)
Organization: Xoran Technologies
Lines: 16
Message-ID: <hd6tk5$st5$1@fred.mathworks.com>
References: <hd6q5h$ri9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257699781 29605 172.30.248.35 (8 Nov 2009 17:03:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 8 Nov 2009 17:03:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:583368


"M K" <maha_k@mathworks.com> wrote in message <hd6q5h$ri9$1@fred.mathworks.com>...
> How does one remove zeros from an array of numbers. For example f 
> 
> x=[0
> 0
> 0
> 0
> 1
> 2
> 3
> 0
> 0
> 0];
> 

x=nonzeros(x);