Sponsored links: Algebra eBooks
 

Related

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

p:[[1.7,0.75],[1.65,2...

n:6;

array (d, n, n);

Calculate

array-fillarray

array(P, 4, 3);

fillarray(P, ...

Calculate

array-cos-random-sin

array(data,8,8,8);

for i: 0 thru 7 do f...

data;

Calculate

array-charlist-cint-debugmode-do-listarray-make_array-slength-true

debugmode(true);

tekst:"ALA";

code:[a,b,c,d,e,f,g,h...

Calculate

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

p:[[1.7,0.75],[1.65,2...

n:6;

array (d, n, n);

Calculate

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

p:[[1.14,2.5],[1.52,2...

n:6;

array (d, n, n);

Calculate

array-arrayinfo-listarray

m : 2;

array(a, m, 1);

a [0,0] : 1;

Calculate

array-cos-random-sin

array(data,8,8,8);

for i: 0 thru 7 do f...

data[0,0,0];

Calculate

array-cos-do-load

load(fft);

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

array(ra, float, 31);

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
x= array(data,8,8,8);
(%o1)                              x = data
(%i2) 

Related Help

Help for Array