[newbie-question] How to import a datafile for lsquares



On 1/19/07, Hugo Coolens <coolens at kahosl.be> wrote:

> I already found in the archives that regression analysis can be performed
> by means of the lsquares package. Can anyone tell me how to import the
> datafile in maxima (preferably without the need of another package)?

I think what you want is read_matrix, in the numericalio package.
So you have to enter load(numericalio) before calling read_matrix.

(%i8) ? read_matrix

 -- Function: read_matrix (<file_name>)
 -- Function: read_matrix (<file_name>, <separator_flag>)
     Reads the file <file_name> and returns its entire content as a
     matrix.  If <separator_flag> is not specified, the file is assumed
     space-delimited.

     `read_matrix' infers the size of the matrix from the input data.
     Each line of the file becomes one row of the matrix.  If some
     lines have different lengths, `read_matrix' complains.


Hope this helps,
Robert Dodier