Re: Removing Zero's from a Matrix



NZTideMan wrote:


If the zeros are EXACTLY zero, then this will work:
newdata=olddata(olddata~=0);


Thanks for your suggestion.
I have a matrix with 30,000 rows and 6 columns. I checked and all the
elements of a particular row are zero.
i tried what you suggested and it gives me only the first column of
data with the non zero elements :- ( I do not know how to get the
other columns into this non-zero matrix.
.



Relevant Pages

  • Re: formatting cells
    ... I want to take out the zero fourth from the left, but don't want to take any ... middle in each cell, is there a way to format the row so that the "0" will ... This post is a suggestion for Microsoft, ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Very small floating point numbers make code slow?
    ... > terms of user cpu, system cpu, interrupts etc. ... > value that didn't underflow the exp operation. ... the function to evaluate to almost zero, ... missing a point related to your suggestion. ...
    (comp.lang.fortran)
  • Re: Lorentz transformations - a derivation
    ... > reading of zero to define an inertial CS, ... > and that suggestion I found to be a good one ... > accelerating FoR's, inspite of each being ...
    (sci.physics)
  • Re: Lorentz transformations - a derivation
    ... > reading of zero to define an inertial CS, ... > and that suggestion I found to be a good one ... > accelerating FoR's, inspite of each being ...
    (sci.physics.relativity)
  • Re: Panel of control
    ... > Yo Mini ... > Miss PT came up with the best suggestion for the OP.. ... > with zero, nada, rien, nothing.. ...
    (microsoft.public.windowsxp.customize)