This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fwd: No Subject]


-- 
Gerard Jungman <jungman@lanl.gov>
Los Alamos National Laboratory
--- Begin Message ---
Hi,

I've found little bug in a documentation for GSL library (in a matrix
first code example):

Example programs for matrices

The program below shows how to allocate, initialize and read from a matrix
using the functions gsl_matrix_alloc, gsl_matrix_set and gsl_matrix_get.

First you alloc 10x3 matrix:

  for (i = 0; i < 10; i++)
    for (j = 0; j < 3; j++)
      gsl_matrix_set (m, i, j, 0.23 + 100*i + j);

Then you're trying to show 100x3 matrix:

  for (i = 0; i < 100; i++)
    for (j = 0; j < 3; j++)
      printf ("m(%d,%d) = %g\n", i, j,
              gsl_matrix_get (m, i, j));

It's little bug, but anyway maybe you're interested to remove it.

Thank you for GSL.

Best Regards,
--
Maciej Matyka
http://panoramix.ift.uni.wroc.pl/~maq


--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]