Path: news.mathworks.com!not-for-mail
From: "James " <jalanNOSPAMthomas@verizon.net>
Newsgroups: comp.soft-sys.matlab
Subject: deleting 0s from an array
Date: Thu, 16 Aug 2007 01:03:52 +0000 (UTC)
Organization: Naval Surface Warfare Center Dahlgren Division
Lines: 18
Message-ID: <fa07po$f1c$1@fred.mathworks.com>
Reply-To: "James " <jalanNOSPAMthomas@verizon.net>
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 1187226232 15404 172.30.248.37 (16 Aug 2007 01:03:52 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 16 Aug 2007 01:03:52 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 800318
Xref: news.mathworks.com comp.soft-sys.matlab:424081


  Is there any easy way to delete all zero values from an 
array (i.e., other than going through each element and 
rebuilding)?  

  This is a 1-D array whose values are used in a 
histogram.  Sometimes the bins are too wide in value to get 
much information, so I wanted to narrow down by looking at 
individual bins with more granularity.  I can find the 
maximum value range for the bins, then the next highest, 
etc. and generate histograms.

   Or is there a better idea?

Thanks