Re: [Help-gsl] How to make diagonal matrix from vector

2005-09-06 Thread James Bergstra
On Tue, Sep 06, 2005 at 05:11:50AM -0700, hariram subramanian wrote: ... > In simple words, I want to make GSL work in the way as Matlab does with diag > (X), where X is some vector. You might try something like this: gsl_matrix * my_diag_alloc(gsl_vector * X) { gsl_matrix * mat = gsl_matrix

[Help-gsl] How to make diagonal matrix from vector

2005-09-06 Thread hariram subramanian
Dear users of GSL, How can one get a diagonal matrix from given set of vector using GSL ? I saw a patch in the users list. Is there a better way of using the same ( perhaps some algorithm ) instead of making use of patch ? as I use knoppix - quantian ( with GSL) i can really change and apply p