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_hashed_array

Function: read_hashed_array (<S>, <A>)

array (A, 2, 3);
read_array (file_search ("array.data"), A, comma);
arraylist (A);
A;
read_hashed_array (file_search ("array.data"), B, comma);
arraylist (B);
B[Schmidt];

Function: read_hashed_array (<S>, <A>, <separator_flag>) Reads the source <S> and returns its entire content as a hashed array. The source <S> may be a file name or a stream.

read_hashed_array treats the first item on each line as a hash key, and associates the remainder of the line (as a list) with the key. For example, the line 567 12 17 32 55 is equivalent to A[567]: [12, 17, 32, 55]$. Lines need not have the same numbers of elements.

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

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:[[0.4,0.3],[1.2,3.2...

n:6;

array (d, n, n);

Calculate

array-diff-subst

array(M, 5);

array (CM, 5);

f(x):=1/(1-x*p);

Calculate

array-arrayinfo-listarray

array (P,3,1);

arrayinfo (P);

i:1;

Calculate

array-float-load-matrix

load (lsquares);

array(ex,100);

array(a,101);

Calculate

array-block-float-listarray-plot2d-print-random
plot2d([[discrete, listarray(Lx), listarray(Ly)],f], [x,0,n], [y,0,1.2]);

n : 101;

array(Lx, flonum, n) ;

array(Ly, flonum, n) ;

Calculate

array-denom-do-ratsimp

array( E,2100);

array(F,2100);

E[0]:0;

Calculate

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

p:[[1.3,0.25],[1.15,3...

display2d:false;

n:6;

Calculate

array-fillarray-listarray

array(P, 4, 3);

fillarray(P, ...

listarray(P);

Calculate