Sponsored links: Algebra eBooks
 

Related

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

vecteur_activation(n)...

h(i,n):=block(compt:0...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

vecteur_activation(n)...

h(i,n):=block(compt:0...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

vecteur_activation(n)...

h(i,n):=block(compt:0...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

vecteur_activation(n)...

h(i,n):=block(compt:0...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

matrice_poid(5);

vecteur_activation(n)...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

matrice_poid(5);

vecteur_activation(n)...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

vecteur_activation(n)...

h(i,n):=block(compt:0...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

vecteur_activation(n)...

h(i,n):=block(compt:0...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

vecteur_activation(n)...

h(i,n):=block(compt:0...

Calculate

block-genmatrix-print-random-return

matrice_poid(n):=bloc...

matrice_poid(5);

vecteur_activation(n)...

Calculate

[block,genmatrix,print,random,return]

Run Example
(%i1)matrice_poid(n):=block([],a[n,n]=0, for i:1 thru n do (for j:i thru n do(if j=i then a[i,j]:0 else a[i,j]:random(2),a[j,i]:a[i,j])),return(genmatrix(a,n,n)));
(%o1) matrice_poid(n) := block([], a     = 0, 
                                    n, n
for i thru n do (for j from i thru n do (if j = i then a     : 0
                                                        i, j
 else a     : random(2), a     : a    )), return(genmatrix(a, n, n)))
       i, j               j, i    i, j
(%i2) vecteur_activation(n):=block([], for k:1 thru n do b[k,1]:random(2),return(genmatrix(b,n,1)));
(%o2) vecteur_activation(n) := block([], for k thru n do b     : random(2), 
                                                          k, 1
                                                    return(genmatrix(b, n, 1)))
(%i3) h(z,n):=block(compt:0,for l:1 thru n do (compt:compt+a[z,l]*b[l,1]),compt);
(%o3) h(z, n) := block(compt : 0, for l thru n do compt : compt + a     b    , 
                                                                   z, l  l, 1
                                                                         compt)
(%i4) lanceur(z,n):=block([],print(matrice_poid(n)),print(vecteur_activation(n)),print(h(z,n)));
(%o4) lanceur(z, n) := block([], print(matrice_poid(n)), 
                                  print(vecteur_activation(n)), print(h(z, n)))
(%i5) lanceur(2,5);
[ 0  0  0  0  1 ]
[               ]
[ 0  0  0  1  1 ]
[               ]
[ 0  0  0  1  0 ] 
[               ]
[ 0  1  1  0  1 ]
[               ]
[ 1  1  0  1  0 ]
[ 1 ]
[   ]
[ 1 ]
[   ]
[ 0 ] 
[   ]
[ 0 ]
[   ]
[ 1 ]
1 
(%o5)                                  1
(%i6) 
Run Example
matrice_poid(n):=block([],a[n,n]=0, for i:1 thru n do (for j:i thru n do(if j=i then a[i,j]:0 else a[i,j]:random(2),a[j,i]:a[i,j])),return(genmatrix(a,n,n)));
(%o1) matrice_poid(n) := block([], a     = 0, 
                                    n, n
for i thru n do (for j from i thru n do (if j = i then a     : 0
                                                        i, j
 else a     : random(2), a     : a    )), return(genmatrix(a, n, n)))
       i, j               j, i    i, j
(%i2) vecteur_activation(n):=block([], for j:1 thru n do b[j,1]:random(2),return(genmatrix(b,n,1)));
(%o2) vecteur_activation(n) := block([], for j thru n do b     : random(2), 
                                                          j, 1
                                                    return(genmatrix(b, n, 1)))
(%i3) h(i,n):=block(compt:0,for j:1 thru n do (compt:compt+a[i,j]*b[j,1]),compt);
(%o3) h(i, n) := block(compt : 0, for j thru n do compt : compt + a     b    , 
                                                                   i, j  j, 1
                                                                         compt)
(%i4) lanceur(n,i):=block([],print(matrice_poid(n)),print(vecteur_activation(n)),print(h(i,n)));
(%o4) lanceur(n, i) := block([], print(matrice_poid(n)), 
                                  print(vecteur_activation(n)), print(h(i, n)))
(%i5) lanceur(5,8);
[ 0  0  0  0  1 ]
[               ]
[ 0  0  0  1  1 ]
[               ]
[ 0  0  0  1  0 ] 
[               ]
[ 0  1  1  0  1 ]
[               ]
[ 1  1  0  1  0 ]
[ 1 ]
[   ]
[ 1 ]
[   ]
[ 0 ] 
[   ]
[ 0 ]
[   ]
[ 1 ]
a     + a     + a     
 8, 5    8, 2    8, 1
(%o5)                        a     + a     + a
                              8, 5    8, 2    8, 1
(%i6) 
Run Example
matrice_poid(n):=block([],a[n,n]=0, for i:1 thru n do (for j:i thru n do(if j=i then a[i,j]:0 else a[i,j]:random(2),a[j,i]:a[i,j])),return(genmatrix(a,n,n)));
(%o1) matrice_poid(n) := block([], a     = 0, 
                                    n, n
for i thru n do (for j from i thru n do (if j = i then a     : 0
                                                        i, j
 else a     : random(2), a     : a    )), return(genmatrix(a, n, n)))
       i, j               j, i    i, j
(%i2) vecteur_activation(n):=block([], for j:1 thru n do b[j,1]:random(2),return(genmatrix(b,n,1)));
(%o2) vecteur_activation(n) := block([], for j thru n do b     : random(2), 
                                                          j, 1
                                                    return(genmatrix(b, n, 1)))
(%i3) h(i,n):=block(compt:0,for j:1 thru n do (compt:compt+a[i,j]*b[j,1]),compt);
(%o3) h(i, n) := block(compt : 0, for j thru n do compt : compt + a     b    , 
                                                                   i, j  j, 1
                                                                         compt)
(%i4) lanceur(n,i):=block([],print(matrice_poid(n)),print(vecteur_activation(n)),print(h(i,n)));
(%o4) lanceur(n, i) := block([], print(matrice_poid(n)), 
                                  print(vecteur_activation(n)), print(h(i, n)))
(%i5) lanceur(5,3);
[ 0  0  0  0  1 ]
[               ]
[ 0  0  0  1  1 ]
[               ]
[ 0  0  0  1  0 ] 
[               ]
[ 0  1  1  0  1 ]
[               ]
[ 1  1  0  1  0 ]
[ 1 ]
[   ]
[ 1 ]
[   ]
[ 0 ] 
[   ]
[ 0 ]
[   ]
[ 1 ]
0 
(%o5)                                  0
(%i6) 
[addrow,append,block,copylist,copymatrix,delete,error,hipow,length,makelist,print,resultant,return,row,submatrix] [addrow,block,concat,display,false,if,log,matrix,numer,print,return,round,true,while] [addrow,block,concat,false,if,log,matrix,numer,print,return,round,true,while] [addrow,do,genmatrix,kill,linsolve,print,random] [addrow,genmatrix,linsolve_params,print,random,tex1,true] [append,atom,block,delete,flatten,if,lambda,load,map,return] [append,block,buildq,first,return,show,simp] [append,block,debugmode,print,return,rhs,true] [append,block,do,expand,hipow,length,makelist,part,print,product,rat,return,sqrt,unique] [append,block,listify,makelist,primep,return,setify] [apply,args,block,col,copymatrix,do,genmatrix,map,mod,quotient,return,transpose] [apply,args,block,copymatrix,do,genmatrix,map,mod,quotient,return,transpose] [apply,block,coeff,copylist,do,expand,length,makelist,print,rat,return,subst,sum] [apply,block,coeff,copylist,do,makelist,print,return,sum] [apply,block,coeff,copylist,expand,length,makelist,print,rat,return,subst,sum] [atom,block,expand,false,length,part,print,return,sqrt] [bern,bfloat,block,fpprec,makelist,numer,return,sum] [bfloat,bftorat,block,ev,float2bf,makelist,mod,ratepsilon,ratprint,return] [bfloat,bftorat,block,float2bf,makelist,mod,ratepsilon,ratprint,return] [binomial,block,delta,determinant,do,expand,genmatrix,hipow,kron_delta,makelist,part,print,return,subst] [binomial,block,delta,determinant,do,expand,genmatrix,hipow,kron_delta,makelist,part,print,return,sum] [binomial,block,delta,determinant,do,expand,genmatrix,kron_delta,return] [binomial,block,genmatrix,return] [block,concat,do,kill,makelist,obase,return,stringdisp,true,while] [block,copymatrix,genmatrix,if,print,random,return,while] [block,display,fpprec,fpprintprec,return] [block,do,error,print,return] [block,do,genmatrix,mod,quotient,return] [block,do,indices,lambda,makelist,map,mod,print,sublist_indices] [block,do,mod,return,while] [block,genmatrix,if,print,random,return,while] [block,genmatrix,if,random,return,while] [block,genmatrix,if,random,return] [block,genmatrix,print,random,return] [block,genmatrix,random,return] [block,inv_mod,mod,print] [block,inv_mod,print,while] [block,length,map,matrix,print,return] [block,primep,print] [block,print,random] [block,print,return] [block,print] [block,return] [ceiling,col,do,endcons,float,genmatrix,kill,makelist,min,permanent,print,random,row,sort,sqrt,transpose] [ceiling,do,float,genmatrix,kill,permanent,print,random,row,sqrt] [do,first,genmatrix,kill,makelist,min,ordergreatp,permanent,permutations,print,random,rest,row,sort,sum] [do,float,if,print,return] [do,genmatrix,kill,linsolve,print,random,tex1] [do,genmatrix,kill,linsolve,print,random] [genmatrix,ident,print,random]

Related Help

Help for Block

Help for Genmatrix

Help for Print

Help for Random

Help for Return