Sponsored links: Algebra eBooks
 

Related

array-cos-do-load

load(fft);

y(t):=cos(2*%pi*10*t);

array(ra, float, 31);

Calculate

array-expand-plot2d
plot2d([[discrete, p],f(x)], [x,1,3.7], [style, points, lines],  [color, red, blue], [point_type, asterisk],  [legend, "data", "approximation"], [xlabel, "x"], [ylabel, "y"]);

p:[[1.3,0.25],[1.15,3...

n:6;

array (d, n, n);

Calculate

array-arrayinfo-listarray-pi

array (aa, 2, 3);

aa [2, 3] : %pi;

aa [1, 2] : %e;

Calculate

array-conjugate-genmatrix-listarray-matrix

array(mitabla,2,2);

mitabla[0,0]:11;

mitabla[0,0];

Calculate

array-bfloat-cos-do-load-print

load(fft);

y(t):=cos(2*%pi*t);

array(ra, float, 31);

Calculate

array-listarray

array(a, 5, 1);

a[0,0] = 5;

listarray(a);

Calculate

array-display2d-expand-false-plot2d
plot2d([[discrete, p],f(x)], [x,1,3.6], [style, points, lines],  [color, red, blue], [point_type, asterisk],  [legend, "data", "approximation"], [xlabel, "x"], [ylabel, "y"]);

p:[[1.3,0.25],[1.15,3...

display2d:false;

n:6;

Calculate

array

array(a,2,3,4);

a(2);

Calculate

array-arrayinfo-fillarray

array(P, 4, 3);

fillarray(P, ...

arrayinfo(P);

Calculate

array

Run Example
(%i1)p:[[1.44,0.53],[1.52,2.21],[1,2],[2.15,1.8],[3,0.15],[4.5,2.25]];
(%o1) [[1.44, 0.53], [1.52, 2.21], [1, 2], [2.15, 1.8], [3, 0.15], [4.5, 2.25]]
(%i2) n:6;
(%o2)                                  6
(%i3) array (d, n, n);
(%o3)                                  d
(%i4) for j : 1 thru n do d[1, j] : p[j][2];
(%o4)                                done
(%i5) /* вычисление таблицы конечных разностей, верхнетреугольная часть таблицы */for i : 2 thru n do for j : 1 thru n+1-i do d[i, j] : (d[i-1,j+1]-d[i-1,j])/(p[j+i-1][1]-p[j][1]);
(%o5)                                done
(%i6) f(x):= d[1,1]+ d[2,1]*(x-p[1][1])+ d[3,1]*(x-p[1][1])*(x-p[2][1])+ d[4,1]*(x-p[1][1])*(x-p[2][1])*(x-p[3][1])+ d[5,1]*(x-p[1][1])*(x-p[2][1])*(x-p[3][1])*(x-p[4][1])+ d[6,1]*(x-p[1][1])*(x-p[2][1])*(x-p[3][1])*(x-p[4][1])*(x-p[5][1]);
(%o6) f(x) := d     + d     (x - (p ) ) + d     (x - (p ) ) (x - (p ) )
               1, 1    2, 1        1       3, 1        1           2
                                     1                   1           1
 + d     (x - (p ) ) (x - (p ) ) (x - (p ) )
    4, 1        1           2           3
                  1           1           1
 + d     (x - (p ) ) (x - (p ) ) (x - (p ) ) (x - (p ) )
    5, 1        1           2           3           4
                  1           1           1           1
 + d     (x - (p ) ) (x - (p ) ) (x - (p ) ) (x - (p ) ) (x - (p ) )
    6, 1        1           2           3           4           5
                  1           1           1           1           1
(%i7) expand(f(x));
                           5                      4                     3
(%o7) - 14.01668789360094 x  + 170.7965444716648 x  - 779.022144765288 x
                                    2
               + 1662.295773252168 x  - 1658.662754800805 x + 620.6092697358614
(%i8) plot2d([[discrete, p],f(x)], [x,0.7,3.2], [style, points, lines],  [color, red, blue], [point_type, asterisk],  [legend, "data", "approximation"], [xlabel, "x"], [ylabel, "y"]);
plotplot2d([[discrete, p],f(x)], [x,0.7,3.2], [style, points, lines],  [color, red, blue], [point_type, asterisk],  [legend, "data", "approximation"], [xlabel, "x"], [ylabel, "y"]);f(1.25);
(%o9)                         - 2.701440186481309
(%i10) 
Run Example
array(rs,1,5);
(%o1)                                 rs
(%i2) i:0;
(%o2)                                  0
(%i3) for x: 0 step 2*%pi/4 thru 2*%pi do (rs[0,i]:x, i:i+1);
(%o3)                                done
(%i4) array(arr,2,101);
(%o4)                                 arr
(%i5) i:0;
(%o5)                                  0
(%i6) for x: 0 step %pi/50 thru 2*%pi do (arr[0,i]:x, i:i+1);
(%o6)                                done
(%i7) for i:0 thru 100 do display(arr[0,i]);
                                  arr     = 0
                                     0, 0

                                           %pi
                                 arr     = ---
                                    0, 1   50

                                           %pi
                                 arr     = ---
                                    0, 2   25

                                          3 %pi
                                arr     = -----
                                   0, 3    50

                                          2 %pi
                                arr     = -----
                                   0, 4    25

                                           %pi
                                 arr     = ---
                                    0, 5   10

                                          3 %pi
                                arr     = -----
                                   0, 6    25

                                          7 %pi
                                arr     = -----
                                   0, 7    50

                                          4 %pi
                                arr     = -----
                                   0, 8    25

                                          9 %pi
                                arr     = -----
                                   0, 9    50

                                           %pi
                                arr      = ---
                                   0, 10    5

                                          11 %pi
                               arr      = ------
                                  0, 11     50

                                          6 %pi
                               arr      = -----
                                  0, 12    25

                                          13 %pi
                               arr      = ------
                                  0, 13     50

                                          7 %pi
                               arr      = -----
                                  0, 14    25

                                          3 %pi
                               arr      = -----
                                  0, 15    10

                                          8 %pi
                               arr      = -----
                                  0, 16    25

                                          17 %pi
                               arr      = ------
                                  0, 17     50

                                          9 %pi
                               arr      = -----
                                  0, 18    25

                                          19 %pi
                               arr      = ------
                                  0, 19     50

                                          2 %pi
                               arr      = -----
                                  0, 20     5

                                          21 %pi
                               arr      = ------
                                  0, 21     50

                                          11 %pi
                               arr      = ------
                                  0, 22     25

                                          23 %pi
                               arr      = ------
                                  0, 23     50

                                          12 %pi
                               arr      = ------
                                  0, 24     25

                                           %pi
                                arr      = ---
                                   0, 25    2

                                          13 %pi
                               arr      = ------
                                  0, 26     25

                                          27 %pi
                               arr      = ------
                                  0, 27     50

                                          14 %pi
                               arr      = ------
                                  0, 28     25

                                          29 %pi
                               arr      = ------
                                  0, 29     50

                                          3 %pi
                               arr      = -----
                                  0, 30     5

                                          31 %pi
                               arr      = ------
                                  0, 31     50

                                          16 %pi
                               arr      = ------
                                  0, 32     25

                                          33 %pi
                               arr      = ------
                                  0, 33     50

                                          17 %pi
                               arr      = ------
                                  0, 34     25

                                          7 %pi
                               arr      = -----
                                  0, 35    10

                                          18 %pi
                               arr      = ------
                                  0, 36     25

                                          37 %pi
                               arr      = ------
                                  0, 37     50

                                          19 %pi
                               arr      = ------
                                  0, 38     25

                                          39 %pi
                               arr      = ------
                                  0, 39     50

                                          4 %pi
                               arr      = -----
                                  0, 40     5

                                          41 %pi
                               arr      = ------
                                  0, 41     50

                                          21 %pi
                               arr      = ------
                                  0, 42     25

                                          43 %pi
                               arr      = ------
                                  0, 43     50

                                          22 %pi
                               arr      = ------
                                  0, 44     25

                                          9 %pi
                               arr      = -----
                                  0, 45    10

                                          23 %pi
                               arr      = ------
                                  0, 46     25

                                          47 %pi
                               arr      = ------
                                  0, 47     50

                                          24 %pi
                               arr      = ------
                                  0, 48     25

                                          49 %pi
                               arr      = ------
                                  0, 49     50

                                arr      = %pi
                                   0, 50

                                          51 %pi
                               arr      = ------
                                  0, 51     50

                                          26 %pi
                               arr      = ------
                                  0, 52     25

                                          53 %pi
                               arr      = ------
                                  0, 53     50

                                          27 %pi
                               arr      = ------
                                  0, 54     25

                                          11 %pi
                               arr      = ------
                                  0, 55     10

                                          28 %pi
                               arr      = ------
                                  0, 56     25

                                          57 %pi
                               arr      = ------
                                  0, 57     50

                                          29 %pi
                               arr      = ------
                                  0, 58     25

                                          59 %pi
                               arr      = ------
                                  0, 59     50

                                          6 %pi
                               arr      = -----
                                  0, 60     5

                                          61 %pi
                               arr      = ------
                                  0, 61     50

                                          31 %pi
                               arr      = ------
                                  0, 62     25

                                          63 %pi
                               arr      = ------
                                  0, 63     50

                                          32 %pi
                               arr      = ------
                                  0, 64     25

                                          13 %pi
                               arr      = ------
                                  0, 65     10

                                          33 %pi
                               arr      = ------
                                  0, 66     25

                                          67 %pi
                               arr      = ------
                                  0, 67     50

                                          34 %pi
                               arr      = ------
                                  0, 68     25

                                          69 %pi
                               arr      = ------
                                  0, 69     50

                                          7 %pi
                               arr      = -----
                                  0, 70     5

                                          71 %pi
                               arr      = ------
                                  0, 71     50

                                          36 %pi
                               arr      = ------
                                  0, 72     25

                                          73 %pi
                               arr      = ------
                                  0, 73     50

                                          37 %pi
                               arr      = ------
                                  0, 74     25

                                          3 %pi
                               arr      = -----
                                  0, 75     2

                                          38 %pi
                               arr      = ------
                                  0, 76     25

                                          77 %pi
                               arr      = ------
                                  0, 77     50

                                          39 %pi
                               arr      = ------
                                  0, 78     25

                                          79 %pi
                               arr      = ------
                                  0, 79     50

                                          8 %pi
                               arr      = -----
                                  0, 80     5

                                          81 %pi
                               arr      = ------
                                  0, 81     50

                                          41 %pi
                               arr      = ------
                                  0, 82     25

                                          83 %pi
                               arr      = ------
                                  0, 83     50

                                          42 %pi
                               arr      = ------
                                  0, 84     25

                                          17 %pi
                               arr      = ------
                                  0, 85     10

                                          43 %pi
                               arr      = ------
                                  0, 86     25

                                          87 %pi
                               arr      = ------
                                  0, 87     50

                                          44 %pi
                               arr      = ------
                                  0, 88     25

                                          89 %pi
                               arr      = ------
                                  0, 89     50

                                          9 %pi
                               arr      = -----
                                  0, 90     5

                                          91 %pi
                               arr      = ------
                                  0, 91     50

                                          46 %pi
                               arr      = ------
                                  0, 92     25

                                          93 %pi
                               arr      = ------
                                  0, 93     50

                                          47 %pi
                               arr      = ------
                                  0, 94     25

                                          19 %pi
                               arr      = ------
                                  0, 95     10

                                          48 %pi
                               arr      = ------
                                  0, 96     25

                                          97 %pi
                               arr      = ------
                                  0, 97     50

                                          49 %pi
                               arr      = ------
                                  0, 98     25

                                          99 %pi
                               arr      = ------
                                  0, 99     50

                               arr       = 2 %pi
                                  0, 100

(%o7)                                done
(%i8) 
Run Example
array(mitabla,2,2);
(%o1)                               mitabla
(%i2) mitabla[0,0]:11;
(%o2)                                 11
(%i3) mitabla[0,0];
(%o3)                                 11
(%i4) listarray(mitabla);
(%o4)    [11, #####, #####, #####, #####, #####, #####, #####, #####]
(%i5) a:matrix([1, 2],[3,4]);
                                   [ 1  2 ]
(%o5)                              [      ]
                                   [ 3  4 ]
(%i6) b:matrix([1,2,3],[5,6,7],[4,5,6]);
                                  [ 1  2  3 ]
                                  [         ]
(%o6)                             [ 5  6  7 ]
                                  [         ]
                                  [ 4  5  6 ]
(%i7) genmatrix(G,2,2);
                               [ G      G     ]
                               [  1, 1   1, 2 ]
(%o7)                          [              ]
                               [ G      G     ]
                               [  2, 1   2, 2 ]
(%i8) conjugate(3+%i);
(%o8)                               3 - %i
(%i9) 
[abs,array,do,if,listarray,plot2d,sin] [apply,array,ev,kill,listarray,load,matrix,plot2d] [array,arrayapply,block,if,sort] [array,arrayinfo,listarray,pi] [array,arrayinfo,listarray] [array,arrayinfo] [array,arrays,make_array] [array,bfloat,cos,do,load,print] [array,block,cos,float,floor,genmatrix,lambda,mod,plot3d,random,round,sin,subst] [array,block,cos,floor,mod,random,sin,subst] [array,block,distrib,exp,float,load,log,random_normal,sqrt] [array,block,float,listarray,make_random_state,plot2d,print,set_random_state,true] [array,block,float,listarray,make_random_state,plot2d,print,set_random_state] [array,block,float,listarray,plot2d,print,random] [array,charat,concat,kill,listarray,random] [array,charlist,cint,debugmode,do,listarray,make_array,slength,true] [array,coeff,conjugate,divide,expand,factor,genmatrix,listarray,matrix,remainder] [array,coeff,conjugate,genmatrix,listarray,matrix] [array,cos,do,load,print] [array,cos,do,load] [array,cos,mod,random,sin,subst] [array,cos,random,sin] [array,denom,do,ratsimp] [array,determinant,diff,exp,invert,matrix,sin,sum] [array,determinant,exp,invert,matrix,sin] [array,diff,print,subst] [array,diff,subst] [array,disp,do,ratsimp] [array,disp,do] [array,display,do,floor,make_array] [array,display] [array,display2d,expand,false,plot2d] [array,distrib,load,random_normal] [array,divsum,do,endcons,length] [array,do,if,listarray,plot2d,sin] [array,do,if,listarray,plot2d] [array,do] [array,expand,plot2d] [array,expandwrt,integrate,sqrt] [array,fillarray,listarray] [array,fillarray,make_array,makelist] [array,genmatrix,lambda,pi] [array,genmatrix,listarray,matrix] [array,if] [array,linsolve,listarray,matrix,nullspace,print,random] [array,listarray,matrix] [array,listarray,random] [array,listarray] [array,sum] [array]

Related Help

Help for Array