Question: How to remove zeros from output?

Hello

If 0 occurs in the first element, I want to remove the list containing zero and the associated number.

example

p := [[[0, 5], [3, 10], [1, 20], [0, 50]], [[2, 5], [0, 10], [2, 20], [0, 50]]]

after processing:

[[[3, 10], [1, 20]], [[2, 5], [2, 20]]]

I tried in vain...

select(i -> (subs(p,p[1,i,1])>0), [$1..nops(p)]);
 

 

Please Wait...