Hi all, this is my first post here. I'm Andrea, an Italian student and I'm trying to learn J, I'm very new to it. Be patient please :)
I've a list of simple questions: 1 - Counting elements line by line. I'm looking for the number of prime factors of a list of numbers If I was going for a single number i'd do: > #q:8 > 3 which is perfect. But I can't do it for a list of numbers, as q:1+i.10 returns a matrix and # returns the number of rows. How can I get the number of prime factor line by line? 2 - Zeroes matter when counting. How can I eliminate items with value 0 from a list? i.e. given 1 0 2 0 3 0 0 4 5 0 0 6 i'd like to obtain 1 2 3 4 5 6 Thanks for your time and replies in advance. -- Andrea ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
