Path: news.mathworks.com!not-for-mail
From: "M K" <maha_k@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Take non-zero values
Date: Sun, 8 Nov 2009 16:04:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <hd6q5h$ri9$1@fred.mathworks.com>
Reply-To: "M K" <maha_k@mathworks.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257696241 28233 172.30.248.38 (8 Nov 2009 16:04:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 8 Nov 2009 16:04:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1115780
Xref: news.mathworks.com comp.soft-sys.matlab:583354


How does one remove zeros from an array of numbers. For example f 

x=[0
0
0
0
1
2
3
0
0
0];


How can I get x to be

x=[1
2
3]

thanks