There's also rt0=: }.~ -@(#.~)@(0&=)
On Wed, Mar 30, 2016 at 8:24 AM, Roger Hui <[email protected]> wrote: > rtz=: #~ +./\.@(0&~:) > > On Wed, Mar 30, 2016 at 8:13 AM, Kip Murray <[email protected]> > wrote: > >> How do you remove trailing zeros from a vector? >> >> rtz 0 1 2 3 >> 0 1 2 3 >> rtz 0 1 2 0 >> 0 1 2 >> rtz 0 1 0 0 >> 0 1 >> rtz 0 0 0 0 >> >> --Kip Murray >> >> >> -- >> Sent from Gmail Mobile >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
