Sponsored links: Algebra eBooks
 

Related

append-exp-invert-matrix-radcan-row-sqrt-transpose

v_append(A, B) := tra...

df_dx: matrix([2*x]);

df_dz: matrix([0, 1]);

Calculate

append-bessel_k

v:0;

A(z):=bessel_k(v, z);

a:[];

Calculate

append-map-plot2d-resultant-solve-sqrt
plot2d(append( [-2*A-3, -2*A-5, -2*A-7, 2*A+1, if abs(A+4) <1 then %i else-2*A-7-4/(A+4),/* [parametric, -t^2-7-t+1/t, t^2+7+2*t-2/t, [t,-3,3], [nticks, 1000]],  [parametric, -t-15/2-rt32(t), t+8+2*rt32(t), [t,1/16,16], [nticks, 1000]], [parametric, -t-15/2+rt32(t), t+8-2*rt32(t), [t,1/16,16], [nticks, 1000]],*/ [parametric, 4*a-4+1/a, 4*a^2-4*a+5-2/a,[a,-2,-1/8], [ nticks, 1000]], [parametric, 4*a-4+1/a, 4*a^2-4*a+5-2/a,[a,1/8,2], [ nticks, 1000]]], map(rhs, solve(r, B))),    [A,-12.5,4.5],    [color, black,black,green,black,red, green, green, green, blue,blue,red,red,red,red],    [legend, false],    [y,-24, 30]);

f: x^3-(A+2)*x^2+B*x-A;

g: 2*x^2+B*x-A*(B+2*A...

r:resultant(f,g,x);

Calculate

append-block-delete-do-emptyp-if-lambda-length-makelist-map-not-subst

M:[A,C,T,T,A,C,T,A];

K:[T,A,C];

retain_segment(l,m,k,...

Calculate

append-first-lambda-second-sublist

mx:30;

s:[];

for i from 1 thru mx ...

Calculate

append-block-length-makelist-return

M:[A,C,T,T,A,C,T,A];

K:[T,A,C];

find(s, l):=block([an...

Calculate

append-block-do-flatten-load-makelist-return

load(functs);

block(for i in (makel...

Calculate

append

mx:100;

s:[];

for i from 1 thru mx ...

Calculate

append-block-genmatrix-if-map-matrix-mod-print-quotient-transpose

f(x) := block([], if ...

n : 4;

W : matrix([0,-1,1,1]...

Calculate

append-delta-if-limit-plot2d-sin
plot2d([[discrete,hn1],[discrete,hn1]],[x,-15,15],[y,-1,1],[style, [points,2,1,1], [impulses,1]],[point_type,circle],[legend,"(-1)^n*sin(n)/(%pi*n)",""]);

hn1:[];

hn2:[];

f(n):=(-1)^n*sin(n)/(...

Calculate

append

Run Example
(%i1)load(eigen);
(%o1)           /usr/share/maxima/5.21.1/share/matrix/eigen.mac
(%i2) P: matrix([0,1,0],[0,0,1],[1,0,0]);
                                  [ 0  1  0 ]
                                  [         ]
(%o2)                             [ 0  0  1 ]
                                  [         ]
                                  [ 1  0  0 ]
(%i3) Pdag: ctranspose(P);
                                  [ 0  0  1 ]
                                  [         ]
(%o3)                             [ 1  0  0 ]
                                  [         ]
                                  [ 0  1  0 ]
(%i4) A: P+Pdag;
                                  [ 0  1  1 ]
                                  [         ]
(%o4)                             [ 1  0  1 ]
                                  [         ]
                                  [ 1  1  0 ]
(%i5) hermitianmatrix: false;
(%o5)                                false
(%i6) [L, V]: eigenvectors(A);
(%o6)   [[[2, - 1], [1, 2]], [[[1, 1, 1]], [[1, 0, - 1], [0, 1, - 1]]]]
(%i7) Ltmp: [];
(%o7)                                 []
(%i8) Vtmp: [];
(%o8)                                 []
(%i9) for i:1 thru length(L[1]) do    for j:1 thru L[2][i] do      (        Ltmp: append(Ltmp, [L[1][i]]),     Vtmp: append(Vtmp, V[i][j])  );
(%o9)                                done
(%i10) Ltmp;
(%o10)                           [2, - 1, - 1]
(%i11) Vtmp;
(%o11)                  [1, 1, 1, 1, 0, - 1, 0, 1, - 1]
(%i12) U: tranpose(matrix(Vtmp));
(%o12)            tranpose([ 1  1  1  1  0  - 1  0  1  - 1 ])
(%i13) D: apply(diag_matrix, Ltmp);
                                [ 2   0    0  ]
                                [             ]
(%o13)                          [ 0  - 1   0  ]
                                [             ]
                                [ 0   0   - 1 ]
(%i14) 
Run Example
H(z):=(z+1/3)*(z-3/2)*(z-2)/z^3;
                                     1       3
                                (z + -) (z - -) (z - 2)
                                     3       2
(%o1)                   H(z) := -----------------------
                                           3
                                          z
(%i2) Ha1(z):=(z-3/2)*(z-2)/((z-2/3)*(z-1/2));
                                          3
                                     (z - -) (z - 2)
                                          2
(%o2)                      Ha1(z) := ---------------
                                          2       1
                                     (z - -) (z - -)
                                          3       2
(%i3) Hm1(z):=(z+1/3)*(z-1/2)*(z-2/3)/z^3;
                                      1       1       2
                                 (z + -) (z - -) (z - -)
                                      3       2       3
(%o3)                  Hm1(z) := -----------------------
                                            3
                                           z
(%i4) Ha2(z):=(z+1/3)*(z-3/2)*(z-2)/((z+3)*(z-2/3)*(z-1/2));
                                      1       3
                                 (z + -) (z - -) (z - 2)
                                      3       2
(%o4)                  Ha2(z) := -----------------------
                                              2       1
                                 (z + 3) (z - -) (z - -)
                                              3       2
(%i5) Hm2(z):=(z+3)*(z-2/3)*(z-1/2)/(z^3);
                                              2       1
                                 (z + 3) (z - -) (z - -)
                                              3       2
(%o5)                  Hm2(z) := -----------------------
                                            3
                                           z
(%i6) l:solve(ratnumer(H(z)),z);
                                   1      3
(%o6)                       [z = - -, z = -, z = 2]
                                   3      2
(%i7) nullst:[];
(%o7)                                 []
(%i8) re(x):=abs(x)*cos(carg(x));
(%o8)                    re(x) := abs(x) cos(carg(x))
(%i9) im(x):=abs(x)*sin(carg(x));
(%o9)                    im(x) := abs(x) sin(carg(x))
(%i10) for i:1 thru length(l) step 1 do(    a:rhs(l[i]),    nullst:append(nullst,[[re(a),im(a)]]));
(%o10)                               done
(%i11) l:solve(denom(H(z)),z);
(%o11)                              [z = 0]
(%i12) pole:[];
(%o12)                                []
(%i13) for i:1 thru length(l) step 1 do(    a:rhs(l[i]),    pole:append(pole,[[re(a),im(a)]]));
(%o13)                               done
(%i14) concat("usprüngliche Funktion H(z)");
(%o14)                    uspr?ngliche Funktion H(z)
(%i15) plot2d([sqrt(1-x^2),-sqrt(1-x^2),[discrete,nullst],[discrete,pole]],[x,-3,3],[y,-3,3],[style,[lines,0.4],[lines,0.4],[points],[points]],[point_type, circle, circle,circle,times],[color,black,black,red,blue],[legend,false],[gnuplot_preamble, "set size ratio -1"],[adapt_depth,10]);
plotplot2d([sqrt(1-x^2),-sqrt(1-x^2),[discrete,nullst],[discrete,pole]],[x,-3,3],[y,-3,3],[style,[lines,0.4],[lines,0.4],[points],[points]],[point_type, circle, circle,circle,times],[color,black,black,red,blue],[legend,false],[gnuplot_preamble, "set size ratio -1"],[adapt_depth,10]);
Run Example
intervals(items):=block([result],  result: if (emptyp(items)) then [] else           if(listp(items)) then          if(emptyp(rest(items))) then [] else          cons(cons(first(items),  [second(items)]),          intervals(rest(items))));
(%o1) intervals(items) := block([result], 
result : if emptyp(items) then [] else (if listp(items)
 then (if emptyp(rest(items)) then [] else cons(cons(first(items), 
[second(items)]), intervals(rest(items))))))
(%i2) intervals(makelist(n, n, 1, 10));
(%o2) [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]
(%i3) intervals(makelist(n, n, 1, 11));
(%o3) [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], 
                                                             [9, 10], [10, 11]]
(%i4) ans:errcatch(find_root(sin(x), x, 2, 3));

find_root: function has same sign at endpoints: f(2.0) = 0.90929742682568, 
                                                      f(3.0) = 0.14112000805987
(%o4)                                 []
(%i5) ans;
(%o5)                                 []
(%i6) seq(start,stop,stepping,[shift]) := block([                                            n, y:[],                                             shift: (if (not(emptyp(shift)))                                                         then float(first(shift))                                                            else (0.0))                                            ],            (n:floor((float(stop-start)/float(stepping)))),            (if (start <
 stop)            then            (y:flatten(append([y],                                         makelist(float(start+shift+(stepping*(i-start))),                                         i, start, n+start))))            else            (y:flatten(append([y],                                         makelist(-(float(stop-shift-(stepping*(i-stop)))),                                         i, -(n+stop), stop)))))            (if (n>
1.0)                then return(y)                else return([])));
(%o6) seq(start, stop, stepping, [shift]) := 
block([n, y : [], shift : if not emptyp(shift) then float(first(shift))
                      float(stop - start)
 else 0.0], n : floor(-------------------), 
                        float(stepping)
if start < stop then y : flatten(append([y], 
makelist(float(start + shift + stepping (i - start)), i, start, n + start)))
 else y : flatten(append([y], makelist(- float(stop - shift
 - stepping (i - stop)), i, - (n + stop), stop)))(if n > 1.0 then return(y)
 else return([])))
(%i7) intervals(seq(0,7,1));
(%o7) [[0.0, 1.0], [1.0, 2.0], [2.0, 3.0], [3.0, 4.0], [4.0, 5.0], [5.0, 6.0], 
                                                                    [6.0, 7.0]]
(%i8) ans:[];
(%o8)                                 []
(%i9) %pi;
(%o9)                                 %pi
(%i10) %pi, numer;
(%o10)                         3.141592653589793
(%i11) 2*3.14159/%pi;
                                    6.28318
(%o11)                              -------
                                      %pi
(%i12) block([ans:[]], errormsg:false, for i in intervals(seq(0, 7, 1)) do ans:(append(ans, errcatch(find_root(sin(x), x, first(i), second(i))))), errormsg:true, return(ans));
(%o12)            [0.0, 3.141592653589793, 6.283185307179586]
(%i13) 
[abs,append,args,block,return,rhs,sin] [abs,append,carg,cos,denom,do,plot2d,ratnumer,rhs,sin,solve,sqrt] [addrow,append,block,copylist,copymatrix,delete,error,hipow,length,makelist,print,resultant,return,row,submatrix] [append,apply,ctranspose,do,eigenvectors,false,load,matrix] [append,args,block,globalsolve,modulus,submatrix,xreduce] [append,args,block,return,rhs,sin] [append,ascii,block,concat,copylist,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,concat,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,copylist,delete,divsum,first,if,make_random_state,next_prime,print,sconcat,second,set_random_state,slength,substring,true] [append,atom,block,delete,do,emptyp,freeof,if,indices,lambda,length,lmax,lmin,makelist,map,member,not,sublist_indices,subst] [append,atom,block,delete,flatten,if,lambda,load,map,return] [append,bessel_k,numer] [append,block,buildq,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,buildq,first,return,show,simp] [append,block,ceiling,emptyp,ev,first,flatten,floor,if,length,makelist,not,second] [append,block,ceiling,emptyp,first,flatten,floor,if,length,makelist,not,second] [append,block,debugmode,print,return,rhs,true] [append,block,declare,do,factor,if,lsum] [append,block,declare,do,factor,lsum] [append,block,delete,do,emptyp,if,lambda,length,makelist,map,not,subst] [append,block,delete,flatten,lambda,length,makelist,map,return] [append,block,do,flatten,load,makelist,return] [append,block,do,integer_partitions,print] [append,block,do,length,makelist,return] [append,block,do,load,makelist,return] [append,block,emptyp,errcatch,errormsg,find_root,first,flatten,floor,if,listp,makelist,not,numer,rest,second,sin] [append,block,emptyp,errcatch,errormsg,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,floor,makelist,map,mod,reverse] [append,block,if] [append,block,length,makelist,return] [append,block,length,return] [append,block,listify,makelist,primep,return,setify] [append,coeff,ev,makelist,ratexpand,solve] [append,concat,first,second] [append,cons,if,let] [append,diff,makelist,plot2d,solve] [append,disp,setify] [append,do,false,ifactors,length] [append,do,first,lambda,second,sublist] [append,do] [append,ev,makelist,plot2d] [append,eval,false,if,labels,lambda,quotient,rest,reverse,sum,true] [append,float,fpprintprec,makelist,phi,plot2d,product,realroots,sum] [append,float,fpprintprec,makelist,plot2d,product,sum] [append,makelist,random,rest] [append,makelist,random] [append,makelist] [append,map,plot2d,resultant,solve,sqrt] [append]

Related Help

Help for Append