I have a file with data in array form, n rows and 4 columns, space
separated.
The data is
Qth 23 41 a+bx
Z9 3 7 41
or,
<name> number number <maxima expression>
In my test case, n < 20
I want to read this file into maxima. I tried filling the array with
nan to be able to later find the end of data, but, that failed.
rows:20; cols:4;
array(M,rows-1,cols-1);
fillarray(M,makelist(nan,i,rows*cols));
read_array("file name",M);
This worked without error. The problem I have is the last token in the
file is repeated to the end of the array.
The file had 4 rows of 4 items. Read_array correctly placed the data
in the first 4 rows of the array. The last item of the file was used
to fill the remaining 16 rows of the array.
Is there some simple way around this?
tomdean