Re: Sort a sparse matrix in descending order



Thanks for the comments,us.
I just tried it out and it does work on a 2-dimentional matrix. And
the example you gave seemed not to work properly either. Although it
did sort non-zero elements in descending order, it did not re-arrange
the sorted matrix so that all zeros are at the bottom of the matrix.

More help needed.
Geo

> one of the solutions
>
> % the data
> r=sprand(10,1,.5);
> % the engine
> sd=@(x) sort(x,1,'descend');
> rs=spfun(sd,r);
> % the result
> r,rs
>
> us
.



Relevant Pages

  • Re: primality
    ... lordships, and privatisations are all broad and alive. ... motivate sadly if Allahdad's engine isn't bottom. ...
    (sci.crypt)
  • Re: Another PO "Gotcha!"
    ... a great little engine btw. ... noticing some gunk at the bottom of the glass housing. ... thumbscrew inside the housing... ...
    (rec.boats.cruising)
  • Re: Another issue from the noob...
    ... After only a couple of laps ours gets so hot you can't even touch the sides of the bottom end, the oil comes out like water, smokes a clutch.. ... The only thing I can guess is a head gasket or even warped head as it did overheat once... ... Tomorrow I am going to spray around the gaskets and see if the engine sound changes... ... If the guy with the similar bike which doesn't overheat would let you try his should you think there is more friction there than there is supposed to be it might point to something. ...
    (rec.motorcycles.dirt)
  • Re: Jeff Burton is a Class Act
    ... This could be valuable information for the future rather than ... examining a wadded up puddle of shrapnel in the bottom of the oil pan. ... burnout and winding it at those same RPM's while driving. ... jack in the pits is more demanding of the engine than the burnouts are. ...
    (rec.autos.sport.nascar)
  • Re: Automotive unrecovery
    ... Battery was original with the van, and was not in good shape. ... Having one mechanic say it's a bad engine is a step in the right ... If it's a front-engine RWD van, ... transmission come out the bottom. ...
    (alt.sysadmin.recovery)