How Can I Read and Write Matrices in GSL?

  • Thread starter Thread starter gradnu
  • Start date Start date
  • Tags Tags
    Scientific
Click For Summary

Discussion Overview

The discussion revolves around reading and writing matrices using the GNU Scientific Library (GSL). Participants express confusion regarding the documentation, particularly concerning binary formats and seek simpler methods akin to those in C programming. Additionally, a participant raises a separate question about computing double and multiple integrals in GSL.

Discussion Character

  • Exploratory, Technical explanation, Homework-related

Main Points Raised

  • One participant expresses confusion about the GSL documentation on reading and writing matrices, specifically mentioning the binary format.
  • Another participant provides details about two GSL functions: gsl_matrix_get and gsl_matrix_set, explaining their purpose and usage.
  • A different participant asks about computing double and multiple integrals in GSL, indicating a lack of information in the manual.

Areas of Agreement / Disagreement

There is no consensus on the best method for reading and writing matrices in GSL, as participants have differing levels of understanding and experience with the library. The question about integrals remains unresolved.

Contextual Notes

The discussion highlights limitations in the GSL documentation regarding matrix operations and integral computations, with participants indicating specific areas of confusion.

gradnu
Messages
21
Reaction score
0
Does anybody know how to read and write matrices in GSL. I am confused by what is given on the website. It says something about binary format which I have no idea about.
Isn't there any other simple way of reading the matrices as we do in 'C'?
 
Technology news on Phys.org
Function: double gsl_matrix_get (const gsl_matrix * m, size_t i, size_t j)
This function returns the (i,j)-th element of a matrix m. If i or j lie outside the allowed range of 0 to n1-1 and 0 to n2-1 then the error handler is invoked and 0 is returned.


Function: void gsl_matrix_set (gsl_matrix * m, size_t i, size_t j, double x)
This function sets the value of the (i,j)-th element of a matrix m to x. If i or j lies outside the allowed range of 0 to n1-1 and 0 to n2-1 then the error handler is invoked.
 
Thanks Clive
 
Hello
I have a question GSL about too. Does anybody know how to compute double and multiple integrals? I have not found it in gsl's manual. Thanks.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 15 ·
Replies
15
Views
5K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
10
Views
5K