Sponsored links: Algebra eBooks
 

Related

simplode

test:[1,2];

t:simplode (test);

t;

Calculate

simplode

test:[1,2];

simplode (test);

Calculate

simplode

test:[1,2];

simplode (test);

Calculate

simplode

test:[1,2];

t:simplode (test);

Calculate

simplode-sqrt-string

string(simplode(((1+v...

Calculate

simplode

test:[1,2];

t:simplode (test, ",");

Calculate

simplode-sqrt

(simplode(((1+v/c)/sq...

Calculate

simplode-sqrt

(simplode(((1+v/c)/sq...

Calculate

simplode

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;

 -- Function: simplode (<list>)
 -- Function: simplode (<list>, <delim>)
     `simplode' takes a list of expressions and concatenates them into
     a string.  If no delimiter <delim> is specified, `simplode' uses
     no delimiter.  <delim> can be any string.

          (%i1) 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.


(%o1)                                true
(%i2) 
Run Example
le:"Без труда - не вытащишь и рыбку из пруда!";
(%o1)              ??? ????? - ?? ???????? ? ????? ?? ?????!
(%i2) cost:7;
(%o2)                                  7
(%i3) zakod(cost,le):=(    k:[],    con:cost,    ind_from:32,    ind_till:126,    count_char:ind_till-ind_from+1,    ind_from_ru:192,    ind_till_ru:255,    count_char_ru:ind_till_ru-ind_from_ru+1,    alpha:count_char_ru+count_char,    minus(x):=mod(x+alpha-con,alpha),    plus(x):=mod(x+con,alpha),    num_2_my_alph(x):=if x<
95 then ascii(x+ind_from) else ascii(x-1+ind_from_ru-ind_till+ind_from),    my_alph_2_num(x):=if x<
=126 then (x-ind_from) else(x-ind_from_ru+ind_till-ind_from+1),    l:charlist(le),    for i in l do(        j:cint(i),            k:endcons(j,k)),    g:map(my_alph_2_num,k),    g:map(plus,g),    h:map(num_2_my_alph,g),    simplode(h)          );
(%o3) zakod(cost, le) := (k : [], con : cost, ind_from : 32, ind_till : 126, 
count_char : ind_till - ind_from + 1, ind_from_ru : 192, ind_till_ru : 255, 
count_char_ru : ind_till_ru - ind_from_ru + 1, 
alpha : count_char_ru + count_char, minus(x) := mod(x + alpha - con, alpha), 
plus(x) := mod(x + con, alpha), num_2_my_alph(x) := 
if x < 95 then ascii(x + ind_from) else ascii(x - 1 + ind_from_ru - ind_till
 + ind_from), my_alph_2_num(x) := if x <= 126 then x - ind_from
 else x - ind_from_ru + ind_till - ind_from + 1, l : charlist(le), 
for i in l do (j : cint(i), k : endcons(j, k)), g : map(my_alph_2_num, k), 
g : map(plus, g), h : map(num_2_my_alph, g), simplode(h))
(%i4) ff:zakod(cost,le);
(%o4)              FFF'FFFFF'4'FF'FFFFFFFF'F'FFFFF'FF'FFFFF(
(%i5) ff;
(%o5)              FFF'FFFFF'4'FF'FFFFFFFF'F'FFFFF'FF'FFFFF(
(%i6) raskod(cost,ff):=(    k:[],    ind_from:32,    ind_till:126,    count_char:ind_till-ind_from+1,    ind_from_ru:192,    ind_till_ru:255,    count_char_ru:ind_till_ru-ind_from_ru+1,    alpha:count_char_ru+count_char,    con:alpha-con,    minus(x):=mod(x+alpha-con,alpha),    plus(x):=mod(x+con,alpha),    num_2_my_alph(x):=if x<
95 then ascii(x+ind_from) else ascii(x-1+ind_from_ru-ind_till+ind_from),    my_alph_2_num(x):=if x<
=126 then (x-ind_from) else(x-ind_from_ru+ind_till-ind_from+1),    l:charlist(ff),    for i in l do(        j:cint(i),            k:endcons(j,k)),    g:map(my_alph_2_num,k),    g:map(plus,g),    h:map(num_2_my_alph,g),    simplode(h)          );
(%o6) raskod(cost, ff) := (k : [], ind_from : 32, ind_till : 126, 
count_char : ind_till - ind_from + 1, ind_from_ru : 192, ind_till_ru : 255, 
count_char_ru : ind_till_ru - ind_from_ru + 1, 
alpha : count_char_ru + count_char, con : alpha - con, 
minus(x) := mod(x + alpha - con, alpha), plus(x) := mod(x + con, alpha), 
num_2_my_alph(x) := if x < 95 then ascii(x + ind_from)
 else ascii(x - 1 + ind_from_ru - ind_till + ind_from), 
my_alph_2_num(x) := if x <= 126 then x - ind_from
 else x - ind_from_ru + ind_till - ind_from + 1, l : charlist(ff), 
for i in l do (j : cint(i), k : endcons(j, k)), g : map(my_alph_2_num, k), 
g : map(plus, g), h : map(num_2_my_alph, g), simplode(h))
(%i7) raskod(7,ff);
(%o7)              ??? ????? - ?? ???????? ? ????? ?? ?????!
(%i8) 

Related Help

Help for Simplode