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:

Read_matrix

Function: read_matrix (<S>)

load(draw);
 load (numericalio);
 s2 : read_matrix (file_search ("wind.data"));
 draw3d(         title = "Daily average wind speeds. Two data sets",         point_size = 2,         key        = "Sample from stations 1, 2 and 3",         points(args(submatrix (s2, 4, 5))),         point_type = 4,         key        = "Sample from stations 1, 4 and 5",         points(args(submatrix (s2, 2, 3))) );

Function: read_matrix (<S>, <M>)

Function: read_matrix (<S>, <separator_flag>)

Function: read_matrix (<S>, <M>, <separator_flag>) read_matrix(<S>) reads the source <S> and returns its entire content as a matrix. The size of the matrix is inferred from the input data; each line of the file becomes one row of the matrix. If some lines have different lengths, read_matrix complains.

read_matrix(<S>, <M>) read the source <S> into the matrix <M>, until <M> is full or the source is exhausted. Input data are read into the matrix in row-major order; the input need not have the same number of rows and columns as <M>.

The source <S> may be a file name or a stream.

The recognized values of <separator_flag> are comma, pipe, semicolon, and space. If <separator_flag> is not specified, the file is assumed space-delimited.

(%o1)                                true
(%i2) 

Related Examples

matrix-permanent

a: matrix([3.8,5,5.5,...

b: permanent(a);

Calculate

matrix-nullspace

C:matrix([1,1,1,-1,-1...

nullC = nullspace(C);

v = C*nullC(1,1);

Calculate

matrix

a:matrix([2,5,3],[-7,...

b:matrix([3,-7,1],[...

a+b;

Calculate

matrix-transpose

B:transpose(matrix([-...

N:matrix([[0.5*(1-x)]...

B.N;

Calculate

matrix-transpose

x11: transpose(matrix...

x21: transpose(matrix...

e: matrix([e11, e12, ...

Calculate

matrix

M:matrix([0,0,0,2,0],...

M.M.M.M.M.M;

Calculate

matrix

J:matrix([0,0,1,0,0],...

J;

Calculate

matrix

M:matrix([0.6,0.35],[...

Mn:inverse(M);

Calculate

matrix-permanent

a: matrix ([255/1000,...

permanent(a);

Calculate

matrix-moebius

moebius (70);

moebius (2 * 3 * 5);

moebius (11 * 17 * 2...

Calculate