Sponsored links: Algebra eBooks
 

Related

sublist_indices

Run Example
(%i1)expr:1/(k*(k+1));
                                       1
(%o1)                              ---------
                                   k (k + 1)
(%i2) sublist_indices([expr], lambda([x], x=k));
(%o2)                                 []
(%i3) 
Run Example
a:[1,2,3,4,3,2,4,2,1];
(%o1)                     [1, 2, 3, 4, 3, 2, 4, 2, 1]
(%i2) sublist_indices(a,lambda([x],x>
=2));
(%o2)                        [2, 3, 4, 5, 6, 7, 8]
(%i3) 
Run Example
a: [1,2,3,4,5,6];
(%o1)                         [1, 2, 3, 4, 5, 6]
(%i2) b: [6,5,4,3,2,1];
(%o2)                         [6, 5, 4, 3, 2, 1]
(%i3) id: sublist_indices(a,evenp);
(%o3)                              [2, 4, 6]
(%i4) 

Related Help

Help for Sublist_indices