Sponsored links: Algebra eBooks
 

Related

read_matrix

Run Example
(%i1)load(descriptive);
(%o1) /usr/share/maxima/5.21.1/share/contrib/descriptive/descriptive.mac
(%i2) load(numericalio);
(%o2) /usr/share/maxima/5.21.1/share/contrib/numericalio/numericalio.mac
(%i3) s:read_matrix(file_search("wind.data"));
(%o3) matrix([10.25, 10.83, 12.58, 18.5, 15.04], 
[10.04, 9.789999999999999, 9.67, 17.54, 13.83], 
[8.039999999999999, 8.5, 7.67, 12.75, 12.71], [1.79, 5.83, 5.88, 5.46, 10.88], 
[6.54, 10.92, 10.34, 12.92, 11.83], [4.42, 7.17, 7.5, 8.119999999999999, 
13.17], [9.289999999999999, 7.58, 7.96, 13.96, 13.79], 
[7.62, 9.25, 10.46, 16.62, 16.46], [10.13, 7.79, 9.08, 13.04, 15.37], 
[7.79, 8.539999999999999, 9.0, 8.58, 11.83], [8.33, 5.71, 8.67, 20.71, 16.92], 
[11.5, 10.37, 14.58, 15.59, 14.09], [0.58, 2.33, 3.37, 5.25, 7.04], 
[2.58, 0.5, 2.67, 7.17, 5.17], [6.83, 4.75, 5.63, 7.54, 6.75], 
[8.789999999999999, 8.210000000000001, 7.33, 13.04, 9.039999999999999], 
[11.04, 8.710000000000001, 11.38, 15.92, 16.08], 
[11.38, 14.67, 16.71, 8.789999999999999, 17.96], 
[2.79, 1.92, 2.71, 6.87, 7.83], [4.92, 3.13, 3.37, 6.5, 6.79], 
[9.17, 7.04, 7.87, 6.75, 12.42], [7.04, 6.34, 7.5, 10.88, 9.92], 
[13.75, 10.75, 13.17, 14.79, 20.58], [19.38, 15.37, 15.12, 23.09, 25.25], 
[8.710000000000001, 7.12, 12.04, 14.04, 17.5], 
[15.16, 16.08, 19.08, 20.5, 25.25], [18.29, 18.66, 19.08, 26.08, 27.63], 
[10.58, 11.92, 11.04, 20.3, 18.12], [20.25, 21.46, 19.95, 27.71, 23.38], 
[10.21, 9.92, 11.96, 18.88, 19.25], [8.210000000000001, 10.5, 
9.960000000000001, 12.42, 13.92], [3.63, 6.5, 5.5, 9.17, 8.0], 
[6.08, 9.08, 7.12, 12.08, 7.17], [5.13, 6.34, 7.38, 9.710000000000001, 8.83], 
[11.04, 13.04, 11.17, 16.5, 11.71], [15.54, 13.37, 13.13, 19.33, 14.67], 
[18.79, 18.96, 14.46, 26.38, 21.84], [9.710000000000001, 13.04, 12.25, 15.21, 
17.58], [17.33, 14.67, 17.79, 23.79, 19.58], 
[15.71, 14.46, 14.67, 23.04, 19.21], [12.54, 11.12, 12.96, 17.83, 17.75], 
[15.5, 15.83, 14.33, 21.17, 21.09], [14.37, 10.37, 14.62, 25.41, 17.04], 
[14.12, 13.96, 16.58, 28.62, 19.67], [12.29, 14.88, 15.67, 14.09, 11.42], 
[7.41, 8.17, 9.210000000000001, 17.12, 10.96], 
[14.29, 14.79, 13.79, 21.92, 22.58], [12.58, 13.25, 14.54, 18.21, 17.67], 
[12.38, 10.0, 11.34, 18.58, 13.25], [11.83, 11.58, 13.67, 29.63, 20.54], 
[7.75, 8.83, 11.08, 15.09, 12.17], [7.04, 4.5, 7.41, 12.12, 6.67], 
[10.29, 9.210000000000001, 13.08, 15.25, 13.21], 
[16.92, 13.21, 18.0, 23.21, 21.21], [4.67, 6.21, 7.0, 9.59, 
9.210000000000001], [12.21, 12.33, 12.5, 16.04, 13.92], 
[17.25, 18.46, 20.04, 22.83, 23.87], [10.83, 10.88, 12.67, 20.0, 17.54], 
[14.46, 13.96, 14.04, 18.41, 13.17], [13.29, 9.0, 12.21, 20.62, 14.46], 
[10.5, 10.58, 12.96, 18.38, 13.79], [12.83, 8.92, 14.09, 23.45, 16.38], 
[5.66, 6.25, 9.789999999999999, 12.46, 8.83], 
[10.34, 11.71, 10.83, 11.58, 14.0], [5.29, 5.21, 5.09, 10.21, 5.54], 
[6.67, 7.08, 7.04, 16.08, 8.75], [8.5, 8.710000000000001, 9.710000000000001, 
17.58, 15.37], [9.710000000000001, 12.46, 11.54, 17.54, 18.16], 
[7.92, 8.869999999999999, 10.5, 12.29, 13.5], 
[15.67, 10.58, 13.54, 22.71, 17.08], [13.7, 16.29, 15.79, 20.5, 22.54], 
[10.5, 13.88, 11.5, 19.7, 18.88], [11.12, 8.75, 9.289999999999999, 20.04, 
15.71], [13.54, 8.460000000000001, 13.92, 22.13, 14.12], 
[5.13, 6.0, 7.29, 20.12, 11.42], [14.29, 13.08, 15.34, 22.79, 19.17], 
[10.46, 13.5, 14.67, 19.38, 22.95], [6.5, 7.04, 9.380000000000001, 11.29, 
11.34], [10.04, 13.67, 13.83, 14.29, 21.09], 
[6.58, 8.58, 10.5, 9.380000000000001, 14.88], 
[4.92, 8.0, 9.039999999999999, 8.25, 13.13], 
[7.38, 9.789999999999999, 8.33, 15.21, 18.34], 
[10.34, 10.0, 10.29, 14.42, 15.46], [13.04, 11.92, 14.5, 21.34, 21.54], 
[10.54, 14.37, 13.88, 15.37, 22.5], [1.46, 6.5, 7.12, 7.21, 15.34], 
[10.92, 9.539999999999999, 10.63, 18.16, 19.58], 
[13.37, 17.54, 14.21, 18.63, 16.83], [14.92, 14.71, 13.46, 15.67, 13.17], 
[9.59, 11.25, 8.539999999999999, 11.96, 12.21], 
[8.210000000000001, 11.21, 6.46, 11.96, 7.17], [4.96, 6.83, 7.0, 10.71, 13.0], 
[8.539999999999999, 7.58, 4.96, 11.08, 9.380000000000001], 
[8.539999999999999, 7.67, 8.08, 14.5, 11.92], 
[8.210000000000001, 10.34, 8.5, 17.16, 13.13], 
[7.33, 6.13, 6.54, 10.25, 11.5], [4.0, 5.66, 3.67, 7.62, 7.21], 
[10.08, 9.210000000000001, 8.42, 11.25, 11.12], 
[9.59, 10.54, 10.5, 10.13, 15.34], [3.58, 6.0, 4.58, 7.62, 11.25])
(%i4) length(s);
(%o4)                                 100
(%i5) mean(s);
(%o5)       [9.948499999999999, 10.1607, 10.8685, 15.7166, 14.8441]
(%i6) /*рассчитываемсреднеезначение.Приобработке матрицыполучаемсписоксреднихпостолбцам.*/var(s);
(%o6) [17.22190675000001, 14.98773651000001, 15.47572875, 32.17651044000001, 
                                                             24.42307619000001]
(%i7) std(s);
(%o7) [4.149928523480858, 3.871399812729242, 3.933920277534866, 
                                          5.672434260526957, 4.941970881136392]
(%i8) 
Run Example
load (descriptive);
(%o1) /usr/share/maxima/5.21.1/share/contrib/descriptive/descriptive.mac
(%i2)  s1 : read_list (file_search ("pidigits.data"));
(%o2) [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 
3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 
0, 5, 8, 2, 0, 9, 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 
2, 0, 8, 9, 9, 8, 6, 2, 8, 0, 3, 4, 8, 2, 5, 3, 4, 2, 1, 1, 7, 0, 6, 7]
(%i3)  median (s1);
                                       9
(%o3)                                  -
                                       2
(%i4)  s2 : read_matrix (file_search ("wind.data"));
(%o4) matrix([10.25, 10.83, 12.58, 18.5, 15.04], 
[10.04, 9.789999999999999, 9.67, 17.54, 13.83], 
[8.039999999999999, 8.5, 7.67, 12.75, 12.71], [1.79, 5.83, 5.88, 5.46, 10.88], 
[6.54, 10.92, 10.34, 12.92, 11.83], [4.42, 7.17, 7.5, 8.119999999999999, 
13.17], [9.289999999999999, 7.58, 7.96, 13.96, 13.79], 
[7.62, 9.25, 10.46, 16.62, 16.46], [10.13, 7.79, 9.08, 13.04, 15.37], 
[7.79, 8.539999999999999, 9.0, 8.58, 11.83], [8.33, 5.71, 8.67, 20.71, 16.92], 
[11.5, 10.37, 14.58, 15.59, 14.09], [0.58, 2.33, 3.37, 5.25, 7.04], 
[2.58, 0.5, 2.67, 7.17, 5.17], [6.83, 4.75, 5.63, 7.54, 6.75], 
[8.789999999999999, 8.210000000000001, 7.33, 13.04, 9.039999999999999], 
[11.04, 8.710000000000001, 11.38, 15.92, 16.08], 
[11.38, 14.67, 16.71, 8.789999999999999, 17.96], 
[2.79, 1.92, 2.71, 6.87, 7.83], [4.92, 3.13, 3.37, 6.5, 6.79], 
[9.17, 7.04, 7.87, 6.75, 12.42], [7.04, 6.34, 7.5, 10.88, 9.92], 
[13.75, 10.75, 13.17, 14.79, 20.58], [19.38, 15.37, 15.12, 23.09, 25.25], 
[8.710000000000001, 7.12, 12.04, 14.04, 17.5], 
[15.16, 16.08, 19.08, 20.5, 25.25], [18.29, 18.66, 19.08, 26.08, 27.63], 
[10.58, 11.92, 11.04, 20.3, 18.12], [20.25, 21.46, 19.95, 27.71, 23.38], 
[10.21, 9.92, 11.96, 18.88, 19.25], [8.210000000000001, 10.5, 
9.960000000000001, 12.42, 13.92], [3.63, 6.5, 5.5, 9.17, 8.0], 
[6.08, 9.08, 7.12, 12.08, 7.17], [5.13, 6.34, 7.38, 9.710000000000001, 8.83], 
[11.04, 13.04, 11.17, 16.5, 11.71], [15.54, 13.37, 13.13, 19.33, 14.67], 
[18.79, 18.96, 14.46, 26.38, 21.84], [9.710000000000001, 13.04, 12.25, 15.21, 
17.58], [17.33, 14.67, 17.79, 23.79, 19.58], 
[15.71, 14.46, 14.67, 23.04, 19.21], [12.54, 11.12, 12.96, 17.83, 17.75], 
[15.5, 15.83, 14.33, 21.17, 21.09], [14.37, 10.37, 14.62, 25.41, 17.04], 
[14.12, 13.96, 16.58, 28.62, 19.67], [12.29, 14.88, 15.67, 14.09, 11.42], 
[7.41, 8.17, 9.210000000000001, 17.12, 10.96], 
[14.29, 14.79, 13.79, 21.92, 22.58], [12.58, 13.25, 14.54, 18.21, 17.67], 
[12.38, 10.0, 11.34, 18.58, 13.25], [11.83, 11.58, 13.67, 29.63, 20.54], 
[7.75, 8.83, 11.08, 15.09, 12.17], [7.04, 4.5, 7.41, 12.12, 6.67], 
[10.29, 9.210000000000001, 13.08, 15.25, 13.21], 
[16.92, 13.21, 18.0, 23.21, 21.21], [4.67, 6.21, 7.0, 9.59, 
9.210000000000001], [12.21, 12.33, 12.5, 16.04, 13.92], 
[17.25, 18.46, 20.04, 22.83, 23.87], [10.83, 10.88, 12.67, 20.0, 17.54], 
[14.46, 13.96, 14.04, 18.41, 13.17], [13.29, 9.0, 12.21, 20.62, 14.46], 
[10.5, 10.58, 12.96, 18.38, 13.79], [12.83, 8.92, 14.09, 23.45, 16.38], 
[5.66, 6.25, 9.789999999999999, 12.46, 8.83], 
[10.34, 11.71, 10.83, 11.58, 14.0], [5.29, 5.21, 5.09, 10.21, 5.54], 
[6.67, 7.08, 7.04, 16.08, 8.75], [8.5, 8.710000000000001, 9.710000000000001, 
17.58, 15.37], [9.710000000000001, 12.46, 11.54, 17.54, 18.16], 
[7.92, 8.869999999999999, 10.5, 12.29, 13.5], 
[15.67, 10.58, 13.54, 22.71, 17.08], [13.7, 16.29, 15.79, 20.5, 22.54], 
[10.5, 13.88, 11.5, 19.7, 18.88], [11.12, 8.75, 9.289999999999999, 20.04, 
15.71], [13.54, 8.460000000000001, 13.92, 22.13, 14.12], 
[5.13, 6.0, 7.29, 20.12, 11.42], [14.29, 13.08, 15.34, 22.79, 19.17], 
[10.46, 13.5, 14.67, 19.38, 22.95], [6.5, 7.04, 9.380000000000001, 11.29, 
11.34], [10.04, 13.67, 13.83, 14.29, 21.09], 
[6.58, 8.58, 10.5, 9.380000000000001, 14.88], 
[4.92, 8.0, 9.039999999999999, 8.25, 13.13], 
[7.38, 9.789999999999999, 8.33, 15.21, 18.34], 
[10.34, 10.0, 10.29, 14.42, 15.46], [13.04, 11.92, 14.5, 21.34, 21.54], 
[10.54, 14.37, 13.88, 15.37, 22.5], [1.46, 6.5, 7.12, 7.21, 15.34], 
[10.92, 9.539999999999999, 10.63, 18.16, 19.58], 
[13.37, 17.54, 14.21, 18.63, 16.83], [14.92, 14.71, 13.46, 15.67, 13.17], 
[9.59, 11.25, 8.539999999999999, 11.96, 12.21], 
[8.210000000000001, 11.21, 6.46, 11.96, 7.17], [4.96, 6.83, 7.0, 10.71, 13.0], 
[8.539999999999999, 7.58, 4.96, 11.08, 9.380000000000001], 
[8.539999999999999, 7.67, 8.08, 14.5, 11.92], 
[8.210000000000001, 10.34, 8.5, 17.16, 13.13], 
[7.33, 6.13, 6.54, 10.25, 11.5], [4.0, 5.66, 3.67, 7.62, 7.21], 
[10.08, 9.210000000000001, 8.42, 11.25, 11.12], 
[9.59, 10.54, 10.5, 10.13, 15.34], [3.58, 6.0, 4.58, 7.62, 11.25])
(%i5)  median (s2);
(%o5)                [10.06, 9.855, 10.73, 15.48, 14.105]
(%i6) 
Run Example
load(descriptive);
(%o1) /usr/share/maxima/5.21.1/share/contrib/descriptive/descriptive.mac
(%i2)  load(numericalio);
(%o2) /usr/share/maxima/5.21.1/share/contrib/numericalio/numericalio.mac
(%i3) s:read_matrix (file_search ("wind.data"));
(%o3) matrix([10.25, 10.83, 12.58, 18.5, 15.04], 
[10.04, 9.789999999999999, 9.67, 17.54, 13.83], 
[8.039999999999999, 8.5, 7.67, 12.75, 12.71], [1.79, 5.83, 5.88, 5.46, 10.88], 
[6.54, 10.92, 10.34, 12.92, 11.83], [4.42, 7.17, 7.5, 8.119999999999999, 
13.17], [9.289999999999999, 7.58, 7.96, 13.96, 13.79], 
[7.62, 9.25, 10.46, 16.62, 16.46], [10.13, 7.79, 9.08, 13.04, 15.37], 
[7.79, 8.539999999999999, 9.0, 8.58, 11.83], [8.33, 5.71, 8.67, 20.71, 16.92], 
[11.5, 10.37, 14.58, 15.59, 14.09], [0.58, 2.33, 3.37, 5.25, 7.04], 
[2.58, 0.5, 2.67, 7.17, 5.17], [6.83, 4.75, 5.63, 7.54, 6.75], 
[8.789999999999999, 8.210000000000001, 7.33, 13.04, 9.039999999999999], 
[11.04, 8.710000000000001, 11.38, 15.92, 16.08], 
[11.38, 14.67, 16.71, 8.789999999999999, 17.96], 
[2.79, 1.92, 2.71, 6.87, 7.83], [4.92, 3.13, 3.37, 6.5, 6.79], 
[9.17, 7.04, 7.87, 6.75, 12.42], [7.04, 6.34, 7.5, 10.88, 9.92], 
[13.75, 10.75, 13.17, 14.79, 20.58], [19.38, 15.37, 15.12, 23.09, 25.25], 
[8.710000000000001, 7.12, 12.04, 14.04, 17.5], 
[15.16, 16.08, 19.08, 20.5, 25.25], [18.29, 18.66, 19.08, 26.08, 27.63], 
[10.58, 11.92, 11.04, 20.3, 18.12], [20.25, 21.46, 19.95, 27.71, 23.38], 
[10.21, 9.92, 11.96, 18.88, 19.25], [8.210000000000001, 10.5, 
9.960000000000001, 12.42, 13.92], [3.63, 6.5, 5.5, 9.17, 8.0], 
[6.08, 9.08, 7.12, 12.08, 7.17], [5.13, 6.34, 7.38, 9.710000000000001, 8.83], 
[11.04, 13.04, 11.17, 16.5, 11.71], [15.54, 13.37, 13.13, 19.33, 14.67], 
[18.79, 18.96, 14.46, 26.38, 21.84], [9.710000000000001, 13.04, 12.25, 15.21, 
17.58], [17.33, 14.67, 17.79, 23.79, 19.58], 
[15.71, 14.46, 14.67, 23.04, 19.21], [12.54, 11.12, 12.96, 17.83, 17.75], 
[15.5, 15.83, 14.33, 21.17, 21.09], [14.37, 10.37, 14.62, 25.41, 17.04], 
[14.12, 13.96, 16.58, 28.62, 19.67], [12.29, 14.88, 15.67, 14.09, 11.42], 
[7.41, 8.17, 9.210000000000001, 17.12, 10.96], 
[14.29, 14.79, 13.79, 21.92, 22.58], [12.58, 13.25, 14.54, 18.21, 17.67], 
[12.38, 10.0, 11.34, 18.58, 13.25], [11.83, 11.58, 13.67, 29.63, 20.54], 
[7.75, 8.83, 11.08, 15.09, 12.17], [7.04, 4.5, 7.41, 12.12, 6.67], 
[10.29, 9.210000000000001, 13.08, 15.25, 13.21], 
[16.92, 13.21, 18.0, 23.21, 21.21], [4.67, 6.21, 7.0, 9.59, 
9.210000000000001], [12.21, 12.33, 12.5, 16.04, 13.92], 
[17.25, 18.46, 20.04, 22.83, 23.87], [10.83, 10.88, 12.67, 20.0, 17.54], 
[14.46, 13.96, 14.04, 18.41, 13.17], [13.29, 9.0, 12.21, 20.62, 14.46], 
[10.5, 10.58, 12.96, 18.38, 13.79], [12.83, 8.92, 14.09, 23.45, 16.38], 
[5.66, 6.25, 9.789999999999999, 12.46, 8.83], 
[10.34, 11.71, 10.83, 11.58, 14.0], [5.29, 5.21, 5.09, 10.21, 5.54], 
[6.67, 7.08, 7.04, 16.08, 8.75], [8.5, 8.710000000000001, 9.710000000000001, 
17.58, 15.37], [9.710000000000001, 12.46, 11.54, 17.54, 18.16], 
[7.92, 8.869999999999999, 10.5, 12.29, 13.5], 
[15.67, 10.58, 13.54, 22.71, 17.08], [13.7, 16.29, 15.79, 20.5, 22.54], 
[10.5, 13.88, 11.5, 19.7, 18.88], [11.12, 8.75, 9.289999999999999, 20.04, 
15.71], [13.54, 8.460000000000001, 13.92, 22.13, 14.12], 
[5.13, 6.0, 7.29, 20.12, 11.42], [14.29, 13.08, 15.34, 22.79, 19.17], 
[10.46, 13.5, 14.67, 19.38, 22.95], [6.5, 7.04, 9.380000000000001, 11.29, 
11.34], [10.04, 13.67, 13.83, 14.29, 21.09], 
[6.58, 8.58, 10.5, 9.380000000000001, 14.88], 
[4.92, 8.0, 9.039999999999999, 8.25, 13.13], 
[7.38, 9.789999999999999, 8.33, 15.21, 18.34], 
[10.34, 10.0, 10.29, 14.42, 15.46], [13.04, 11.92, 14.5, 21.34, 21.54], 
[10.54, 14.37, 13.88, 15.37, 22.5], [1.46, 6.5, 7.12, 7.21, 15.34], 
[10.92, 9.539999999999999, 10.63, 18.16, 19.58], 
[13.37, 17.54, 14.21, 18.63, 16.83], [14.92, 14.71, 13.46, 15.67, 13.17], 
[9.59, 11.25, 8.539999999999999, 11.96, 12.21], 
[8.210000000000001, 11.21, 6.46, 11.96, 7.17], [4.96, 6.83, 7.0, 10.71, 13.0], 
[8.539999999999999, 7.58, 4.96, 11.08, 9.380000000000001], 
[8.539999999999999, 7.67, 8.08, 14.5, 11.92], 
[8.210000000000001, 10.34, 8.5, 17.16, 13.13], 
[7.33, 6.13, 6.54, 10.25, 11.5], [4.0, 5.66, 3.67, 7.62, 7.21], 
[10.08, 9.210000000000001, 8.42, 11.25, 11.12], 
[9.59, 10.54, 10.5, 10.13, 15.34], [3.58, 6.0, 4.58, 7.62, 11.25])
(%i4) s:[7,10,38,45,67,99,81,36,25,56,8,94,72,40,21,5,75,67,33,25,97,14,28,32,51,16,5,44,11,15,71,60,45,18,27,11,38,46,95,16,39,28,17,25,1,8,54,19,27,35];
(%o4) [7, 10, 38, 45, 67, 99, 81, 36, 25, 56, 8, 94, 72, 40, 21, 5, 75, 67, 
33, 25, 97, 14, 28, 32, 51, 16, 5, 44, 11, 15, 71, 60, 45, 18, 27, 11, 38, 46, 
95, 16, 39, 28, 17, 25, 1, 8, 54, 19, 27, 35]
(%i5) length(s);
(%o5)                                 50
(%i6) geometric_mean(s);
        1/10   1/25   1/25    1/25        1/25        1/25         1/25
(%o6) 11     17     67     361     1953125     8388608     43046721
                                                                           1/50
                                                             79704971227973
(%i7) var(s);
                                    1765241
(%o7)                               -------
                                     2500
(%i8) std(s);
                                 sqrt(1765241)
(%o8)                            -------------
                                      50
(%i9) 

Related Help

Help for Read_matrix