Sponsored links: Algebra eBooks
 

Related

var

? tr_state_var;

Calculate

var

var: rand(10);

Calculate

var

var: "var";

Calculate

var

? tr_state_var;

Calculate

var

var: rand(10);

Calculate

var

var: "var";

Calculate

var

f(mu,phi,var):=(-.5*(...

Calculate

var

var (p, q, l, fx, e, ...

eq1: nx=p+q*x;

eq2: sx=nx/fx;

Calculate

var

var (p, q, l, fx, e, ...

eq1: nx=p+q*x;

eq2: sx=nx/fx;

Calculate

var

var([0,1,2,3,4]);

Calculate

var

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:[ 2,7,10,7,7,8,4,7,8,6,6,11,7,6,5,12,8,10,2,12,7,11,5,12,7,2,4,7,13,12,4,11,5,6,5,8,6,5,6,11,5,6,6,10,4,4,6,3,8,5];
(%o3) [2, 7, 10, 7, 7, 8, 4, 7, 8, 6, 6, 11, 7, 6, 5, 12, 8, 10, 2, 12, 7, 11, 
5, 12, 7, 2, 4, 7, 13, 12, 4, 11, 5, 6, 5, 8, 6, 5, 6, 11, 5, 6, 6, 10, 4, 4, 
6, 3, 8, 5]
(%i4) length(s);
(%o4)                                 50
(%i5) mean(s) /* Среднее значение.*/;
                                      349
(%o5)                                 ---
                                      50
(%i6) var(s);
                                     20249
(%o6)                                -----
                                     2500
(%i7)  std(s);
                                  sqrt(20249)
(%o7)                             -----------
                                      50
(%i8)  geometric_mean(s)/* Среднее геометрическое. */;
               1/5   1/50    1/25     1/25     1/25         1/25
(%o8)         5    13     121     2187     2401     16777216
(%i9) harmonic_mean(s) /* Среднее гармоническое. */;
                                    6006000
(%o9)                               -------
                                    1060069
(%i10) 
Run Example
var([0,1,2,3,4]);
(%o1)                        var([0, 1, 2, 3, 4])
(%i2) 
Run Example
var: [x,y];
(%o1)                               [x, y]
(%i2) fn: 3*x^4 - 2*x*y + 6*y^4 - 10*x + 6*y;
                          4                    4
(%o2)                  6 y  - 2 x y + 6 y + 3 x  - 10 x
(%i3) f(x):= ''(vectorize(fn,var));
                               4                    4
(%o3)     f(x) := vectorize(6 y  - 2 x y + 6 y + 3 x  - 10 x, [x, y])
(%i4) grad_f(x):= ''(vector_gradient(fn,var));
                                      4                    4
(%o4) grad_f(x) := vector_gradient(6 y  - 2 x y + 6 y + 3 x  - 10 x, [x, y])
(%i5) G(x):= ''(hessian_matrix(fn,var));
                                 4                    4
(%o5)  G(x) := hessian_matrix(6 y  - 2 x y + 6 y + 3 x  - 10 x, [x, y])
(%i6) x_0: matrix([3],[0]);
                                     [ 3 ]
(%o6)                                [   ]
                                     [ 0 ]
(%i7) line_search_type: 2;
(%o7)                                  2
(%i8) epsilon: 5e-1;
(%o8)                                 0.5
(%i9) delta: 5e-1;
(%o9)                                 0.5
(%i10) eta: 5e-1;
(%o10)                                0.5
(%i11) r_max: 20;
(%o11)                                20
(%i12) epsilon_l: epsilon/10;
(%o12)                               0.05
(%i13) delta_l: delta/10;
(%o13)                               0.05
(%i14) eta_l: eta/10;
(%o14)                               0.05
(%i15) r_maxl: 20;
(%o15)                                20
(%i16) [alpha,falpha,outcome,iter,f_eval,grad_f_eval,G_eval,eval]:  alternating_variables_minimize(f,grad_f,G,x_0,line_search_type,epsilon,delta,eta,    epsilon_l,delta_l,eta_l,r_max,r_maxl);
                                                     [ 3 ]
(%o16) [alternating_variables_minimize(f, grad_f, G, [   ], 2, 0.5, 0.5, 0.5, 
                                                     [ 0 ]
                                                                        [ 3 ]
0.05, 0.05, 0.05, 20, 20), alternating_variables_minimize(f, grad_f, G, [   ], 
                                                                        [ 0 ]
2, 0.5, 0.5, 0.5, 0.05, 0.05, 0.05, 20, 20), 
                                             [ 3 ]
alternating_variables_minimize(f, grad_f, G, [   ], 2, 0.5, 0.5, 0.5, 0.05, 
                                             [ 0 ]
                                                                  [ 3 ]
0.05, 0.05, 20, 20), alternating_variables_minimize(f, grad_f, G, [   ], 2, 
                                                                  [ 0 ]
0.5, 0.5, 0.5, 0.05, 0.05, 0.05, 20, 20), 
                                             [ 3 ]
alternating_variables_minimize(f, grad_f, G, [   ], 2, 0.5, 0.5, 0.5, 0.05, 
                                             [ 0 ]
                                                                  [ 3 ]
0.05, 0.05, 20, 20), alternating_variables_minimize(f, grad_f, G, [   ], 2, 
                                                                  [ 0 ]
0.5, 0.5, 0.5, 0.05, 0.05, 0.05, 20, 20), 
                                             [ 3 ]
alternating_variables_minimize(f, grad_f, G, [   ], 2, 0.5, 0.5, 0.5, 0.05, 
                                             [ 0 ]
                                                                  [ 3 ]
0.05, 0.05, 20, 20), alternating_variables_minimize(f, grad_f, G, [   ], 2, 
                                                                  [ 0 ]
0.5, 0.5, 0.5, 0.05, 0.05, 0.05, 20, 20)]
(%i17) 

Related Help

Help for Var