Sponsored links: Algebra eBooks
 

Related

sexplode

Run Example
(%i1)A:matrix([-1, -1,1,0,0],[-1,-2,1,0,0],[-1,-3,0,1,0],[0,-1,0,-1,1],[0,-2,-1,0,1],[0,-1,-1,1,0]);
                           [ - 1  - 1   1    0   0 ]
                           [                       ]
                           [ - 1  - 2   1    0   0 ]
                           [                       ]
                           [ - 1  - 3   0    1   0 ]
(%o1)                      [                       ]
                           [  0   - 1   0   - 1  1 ]
                           [                       ]
                           [  0   - 2  - 1   0   1 ]
                           [                       ]
                           [  0   - 1  - 1   1   0 ]
(%i2) n:rank(A);
(%o2)                                  4
(%i3) test:[1,2];
(%o3)                               [1, 2]
(%i4) sexplode(simplode (test),"|");
(%o4)                           sexplode(12, |)
(%i5) init:setify(makelist((i),i,1,5));
(%o5)                           {1, 2, 3, 4, 5}
(%i6) comb:powerset (init, n);
(%o6) {{1, 2, 3, 4}, {1, 2, 3, 5}, {1, 2, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}
(%i7) i:1;
(%o7)                                  1
(%i8) for sub in comb do (print (remove_j[i]:listify(setdifference(init,sub))), i:i+1);
[5] 
[4] 
[3] 
[2] 
[1] 
(%o8)                                done
(%i9) 
Run Example
simplode(["xx[",3,"]:",expand((x+y)^3)]);
(%o1)                    xx[3]:y^3+3*x*y^2+3*x^2*y+x^3
(%i2)  simplode( sexplode("stars")," * " );
(%o2)                          s * t * a * r * s
(%i3)  simplode( ["One","more","coffee."]," " );
(%o3)                          One more coffee.
(%i4) 
Run Example
charlist("Lisp");
(%o1)                            [L, i, s, p]
(%i2) simplode([L, i, s, p]);
(%o2)                                Lisp
(%i3) sexplode(simplode([L, i, s, p]));
(%o3)                            [L, i, s, p]
(%i4) 

Related Help

Help for Sexplode