Name

write_csv — Read comma-separated value file

Calling Sequence

write_csv(M, filename)

Parameters

filename

a character string. The file path.

M

a matrix of strings.

Description

write_csv(M, filename) writes matrix M into filename as comma-separated values. The filename input is a string.

Examples

// save a matrix as csv file format
A = [1:10] * 0.1;
write_csv(A, TMPDIR + '/datas.csv');

// read as text
mgetl(TMPDIR + '/datas.csv')

r = read_csv(TMPDIR + '/datas.csv',ascii(9));
r = strsubst(r,',','.');
evstr(r)

See Also

read_csv, evstr, mgetl

Authors

Allan CORNET