[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Question about the matrix format change in gsl_matrix
From: |
Brian Gough |
Subject: |
Re: [Help-gsl] Question about the matrix format change in gsl_matrix |
Date: |
Wed, 9 Jun 2004 14:11:31 +0100 |
L Huang writes:
> I have some trouble to keep the original format of my matrix after
> using gsl_matrix_fscanf and gsl_matrix_fprintf. Say I read a 3X3
> matrix from a file by using gsl_matrix_fscanf(fp, m), and write it
> back to another file with gsl_matrix_fprintf(fp2, m,"%2g"). All the
> sudden, the original format (3 by 3 matrix) becomes 1 by 9 column
> vector in new file. Could anyone tell me what's happening here? Is
> there a function for gsl_vector transposition (row vector to column
> vector or vice versa). Your help will be highly appreciated.
The output from gsl_matrix_fprintf is always written as a single
stream of numbers -- it is just a dump of the data.
The gsl_matrix_fscanf function will read the data regardless of
formatting, it is insensitive to whitespace in the input.
--
Brian Gough
(GSL Maintainer)
Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/