FAQ Database Discussion Community

Generalized Inverse function in GSL

Is there any function to calculate Generalized inverse of a matrix using GSL? Like in R, we have ginv(X, tol = sqrt(.Machine$double.eps)).

Normal probability density function - GSL equivalent in Haskell

I am trying to find the best way to draw from a normal distribution. I want to be able to use the normal probability density function (and its cumulative) in Haskell. To put it simply, I want to use the functions on this page without using the GSL binding... I...

Did anyone compiled GSL for androind?

I am trying to compile gsl for android but it is giving error. I checked on their website and they said that It has been reported to compile on the following other platforms, SunOS 4.1.3 & Solaris 2.x (Sparc) Alpha GNU/Linux, gcc HP-UX 9/10/11, PA-RISC, gcc/cc IRIX 6.5, gcc m68k...

Cmake to generate solution file machine independent

I tried to generate a solution file of GSL library for visual studio 2012 using cmake gui. I did that successfully and I build the library for my own computer. But when I tried to build the same solution file in my different computer, it gives me errors saying "C:/my...

Find number of rows/columns in a GSL matrix?

Say I have some gsl_matrix * A. I want to write a function that retrieves e.g. the number of rows in this matrix, without having access to anything else besides the object A itself. Example: int num_rows(gsl_matrix * A){ //some operation(s) on A that find the number of rows in...

Using GNU Scientific Library (GSL) under Windows x64 with MinGW

I have installed MinGW and MSYS on Microsoft Windows (64bit), inside directory C:\MinGW (MSYS directory is C:\MinGW\msys\1.0). I have downloaded the latest GNU Scientific Library (GNU GSL) package from the official ftp. I have used MSYS to perform configure and make successfully as described in the INSTALL file in the...

initialization of a gsl_matrix

I am using GNU scientific library, and I want to initialize a matrix with values, but I can't understand how to do without a loop : This works : gsl_matrix * m = gsl_matrix_alloc (3, 3); for (int i = 0; i < 3; i++) for (int j = 0;...

How to advance the RNG state when sampling random distributions using hmatrix-gsl-stats?

How do I advance the RNG in the hmatrix-gsl-stats when I'm sampling from a random distribution: For example: λ> CN.random_1p Exponential 235252 1.0 0.8742160459331277 λ> CN.random_1p Exponential 235252 1.0 0.8742160459331277 I don't see an obvious interface to maintain the state of the RNG in https://hackage.haskell.org/package/hmatrix-gsl-stats-0.2.1/docs/Numeric-GSL-Distribution-Continuous.html...

Double pendulum solution using GSL

I am learning to use GSL to solve ODE. I wanted to solve double pendulum problem using GSL ODE functions. I decided to use this equations: (source: http://www.physics.usyd.edu.au/~wheat/dpend_html/) My code: #include <iostream> #include <cmath> #include "gsl/gsl_errno.h" #include "gsl/gsl_matrix.h" #include "gsl/gsl_odeiv2.h" #include "constants.h" double L1; double L2; double M1; double M2;...

dlopen failed: cannot locate symbol “cblas_sdsdot” referenced by “libgsl.so”

I cross compiled gsl for android using arm-linux-androideabi compiler following the answer provided in this question. I installed the library in /home/username/AndroidGSL. I checked the file command and it gave me libgsl.so: symbolic link to `libgsl.so.0.14.0' so i did again for libgsl.so.0.14.0 and got this libgsl.so.0.14.0: ELF 32-bit LSB shared...

Using the GNU Scientific Library to Find the Kernel of a Matrix

Given a gsl_matrix * A object, which is an M-by-N matrix, what is the easiest way to find the kernel of A? I tried using singular value decomposition (specifically the gsl_linalg_SV_decomp method), but that doesn't work when M<N, which is sometimes the case for my matrices.