Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Genmatrix Calculator

Genmatrix

Function: genmatrix (<a>, <i_2>, <j_2>, <i_1>, <j_1>)

for n:1 thru 10 do(kill(h),h[i,j]:=random(5)+1,A:genmatrix(h,3,3),X:[x,y,z],b:[random(5)+1,random(5)+1,random(5)+1],C:list_matrix_entries(A.X),R:linsolve([C[1]=b[1],C[2]=b[2],C[3]=b[3]], [x,y,z]),print(C[1]=b[1],C[2]=b[2],C[3]=b[3],R));

Function: genmatrix (<a>, <i_2>, <j_2>, <i_1>)

Function: genmatrix (<a>, <i_2>, <j_2>) Returns a matrix generated from <a>, taking element <a>[<i_1>,<j_1>] as the upper-left element and <a>[<i_2>,<j_2>] as the lower-right element of the matrix. Here <a> is a declared array (created by array but not by make_array) or an undeclared array, or an array function, or a lambda expression of two arguments. (An array function is created like other functions with := or define, but arguments are enclosed in square brackets instead of parentheses.)

If <j_1> is omitted, it is assumed equal to <i_1>. If both <j_1> and <i_1> are omitted, both are assumed equal to 1.

If a selected element i,j of the array is undefined, the matrix will contain a symbolic element <a>[i,j].

Examples:

          (%i1) h [i, j] := 1 / (i + j - 1);
                                              1
          (%o1)                  h     := ---------
                                  i, j    i + j - 1
          (%i2) genmatrix (h, 3, 3);
                                     [    1  1 ]
                                     [ 1  -  - ]
                                     [    2  3 ]
                                     [         ]
                                     [ 1  1  1 ]
          (%o2)                      [ -  -  - ]
                                     [ 2  3  4 ]
                                     [         ]
                                     [ 1  1  1 ]
                                     [ -  -  - ]
                                     [ 3  4  5 ]
          (%i3) array (a, fixnum, 2, 2);
          (%o3)                           a
          (%i4) a [1, 1] : %e;
          (%o4)                          %e
          (%i5) a [2, 2] : %pi;
          (%o5)                          %pi
          (%i6) genmatrix (a, 2, 2);
                                     [ %e   0  ]
          (%o6)                      [         ]
                                     [ 0   %pi ]
          (%i7) genmatrix (lambda ([i, j], j - i), 3, 3);
                                   [  0    1   2 ]
                                   [             ]
          (%o7)                    [ - 1   0   1 ]
                                   [             ]
                                   [ - 2  - 1  0 ]
          (%i8) genmatrix (B, 2, 2);
                                  [ B      B     ]
                                  [  1, 1   1, 2 ]
          (%o8)                   [              ]
                                  [ B      B     ]
                                  [  2, 1   2, 2 ]

(%o1)                                true
(%i2) 

Genmatrix Example

Related Examples

genmatrix-random

rand[a,b]:=random(9);

genmatrix(rand,3,3);

Calculate

genmatrix-mod-quotient

n:4;

etat:genmatrix(e,2^n,n);

for i:1 thru n do ...

Calculate

genmatrix-makelist-random-row-sqrt

norm(x):=sqrt(x.x);

v:[1,1,1];

a[i,j]:=random(15);

Calculate

genmatrix-lambda-log-matrix-plot2d-plot3d
plot2d((x^3+4)/(x^2),[x,-10,10],[y,-10,10]);

plot2d((x^3+4)/(x^2),...

plot2d(['parametric, ...

plot3d(log(x^2+y^2-x*...

Calculate

genmatrix-random

for i:1 thru 3 do dis...

a[i,j]:=random(15);

for i:1 thru 3 do(A:g...

Calculate

genmatrix-random

a[i,j]:=random(15);

a[2,17];

a[2,6];

Calculate

genmatrix-numer-permanent-random-row-sqrt

a[i,j]:=random(15);

A:genmatrix(a,3,3);

permanent(A);

Calculate

genmatrix-makelist

n:11;

h[i,j]:= if mod(i-j,n...

M:genmatrix (h,n,n);

Calculate

genmatrix-kill-random

a[i,j]:=random(15);

genmatrix(a,3,3);

kill(a);

Calculate

genmatrix-ident-print-random

h[i,j]:=random(4)-2;

I:ident(3);

for i:1 thru 100 do ...

Calculate