Re: [Help-gsl] Re: FFT(INVFFT) is not returning original data!

2010-01-11 Thread James Bergstra
I didn't run your code, but is the difference simply a matter of scaling? There is some discussion of this in the documentation. On Mon, Jan 11, 2010 at 4:54 AM, Sumit Adhikari wrote: > A small correction ... "not returning" > Sorry for the inconvenience. > > > On Mon, Jan 11, 2010 at 3:22 PM, S

Re: [Help-gsl] Matrix Multiplication Help

2009-10-30 Thread James Bergstra
If you want to multiply matrices that the user has typed in, your program needs to look something like: 1. allocate storage for each of A, B and C matrices (gsl_matrix_alloc for example) 2. ask the user to type in values, and store them into the matrices A and B 3. call the gsl_cblas_dgemm functio

Re: [Help-gsl] Re: Help with porting GSL to CUDA

2009-09-06 Thread James Bergstra
Are you sure to have thought through whether it is a good idea to port GSL to the CUDA platform? To me it sounds like a bad idea for two main reasons: 1) GSL's data types are not opaque, so you can't very well "hide" the fact that data lives on a GPU. Anyone who tries to access his vector or mat

[Help-gsl] new alsa stuff

2007-02-20 Thread James Bergstra
I have got the alsa stuff working here. It's first-draft code, and could use some reorganizing and polishing, but the technique is there and it works. Using this code implies several new possibilities: - We can disconnect from alsa without changing anything in csound... we don't need to kill

Re: [Help-gsl] Octave-like indexing with the GSL

2006-11-11 Thread James Bergstra
On Sat, Nov 11, 2006 at 06:01:25PM -0500, Jordi Gutierrez Hermoso wrote: > Hello everyone. > > I'm writing some simple C++ wrappers for the GSL for personal use, and > I've already hit a bit of a stump at an early stage. I want to able to > index my wrapper class with Octave-like syntax. E.g. if A

Re: [Help-gsl] gsl_function with pointer

2006-10-07 Thread James Bergstra
On Sat, Oct 07, 2006 at 08:30:50PM +0200, Ivan Liu wrote: > Hi, > > I hope to use to declare a gsl_function by pointer, and > use the integration rountine gsl_integration_qag in the > following way: > > > gsl_function * Integrand=0; > Integrand->function = &f; > Integrand->params = &list; > > g

Re: [Help-gsl] LAPACK,CBLAS matrix inversion

2006-08-07 Thread James Bergstra
On Fri, Aug 04, 2006 at 02:06:39PM +0100, Wei Cheng wrote: > Hi, > > The cholesky decomposition and LU decomposition in GSL linear algerbra > section, is only suitable for small matrix, for large matrix LAPACK is > better as stated on GSL website. I am wondering if there is anyone who has > experi

Re: [Help-gsl] fftw and gsl

2006-08-07 Thread James Bergstra
On Mon, Aug 07, 2006 at 12:11:30PM +0100, Travers, John C wrote: > Hi, > > I'm about to convert a MATLAB program to C using GSL and FFTW. It is > essential that I use FFTW as most of the work is done with FFTs. I've > read through the list archives and browsed around with Google to see if > anyone

Re: [Help-gsl] LAPACK,CBLAS matrix inversion

2006-08-07 Thread James Bergstra
On Fri, Aug 04, 2006 at 02:06:39PM +0100, Wei Cheng wrote: > Hi, > > The cholesky decomposition and LU decomposition in GSL linear algerbra > section, is only suitable for small matrix, for large matrix LAPACK is > better as stated on GSL website. I am wondering if there is anyone who has > experi

Re: [Help-gsl] Multiple roots

2006-07-15 Thread James Bergstra
On Sat, Jul 15, 2006 at 06:11:54PM +, Mohamed Ali Charmi wrote: > Is it possible to find all the roots of a function In general, this is difficult, and the answer is no. Thinking about your problem in particular might help... here are some quickly-generated examples of questions that might be

Re: [Help-gsl] exponential fitting

2006-07-08 Thread James Bergstra
On Sat, Jul 08, 2006 at 08:43:54AM +0200, Petr Ent wrote: > hi, > i am pretty new user of gsl, so please sory for this question... > what is the easiest\fastest way to fit few points with an exponential > function? i found example of non-linear least squares fitting, but it seems > bit slow and

Re: [Help-gsl] Matrix memory deallocation problem

2006-07-06 Thread James Bergstra
On Thu, Jul 06, 2006 at 04:02:06PM +0100, Wei Cheng wrote: > I know it would be more efficient to do it in BLAS way, but , the reason i > need the matrix matrix multiplication function to return a matrix result is > because I have very complicated matrix operations, this matrix product is just > a

Re: [Help-gsl] Matrix memory deallocation problem

2006-07-06 Thread James Bergstra
On Thu, Jul 06, 2006 at 03:05:23PM +0100, Wei Cheng wrote: > I have a matrix-matrix multiplication function based on BLAS matrix-matrix > mutiplication function,just for the ease of my own use as follow: > > //** >gsl_

Re: [Help-gsl] derivative of a data set

2006-06-30 Thread James Bergstra
On Fri, Jun 30, 2006 at 09:21:58AM +0200, Eric Germaneau wrote: > I wish to use gsl in oder to perform the derivative of a data set > contains in an one dimensional array. > It seems that gsl numerical differentiation estimate the derivative of > function only. Indeed, I'm confused... you would l

Re: [Help-gsl] gsl_matrix_fprintf

2006-06-22 Thread James Bergstra
> On 6/21/06, James Bergstra <[EMAIL PROTECTED]> wrote: > > > >On Wed, Jun 21, 2006 at 03:58:50PM -0500, A J wrote: > >> Could there be an issue using gsl_matrix_fprintf with a gsl_matrix which > >> doesn't own it's block? I tried doing thi

Re: [Help-gsl] gsl_matrix_fprintf

2006-06-21 Thread James Bergstra
On Wed, Jun 21, 2006 at 03:58:50PM -0500, A J wrote: > Could there be an issue using gsl_matrix_fprintf with a gsl_matrix which > doesn't own it's block? I tried doing this twice: > > gsl_matirx_frprintf(f1,X,"%.8g"); > > In the the first attempt, X owned it's block at the time the function was >

Re: [Help-gsl] gsl_histogram_get_range

2006-06-16 Thread James Bergstra
On Fri, Jun 16, 2006 at 04:23:14PM +0200, Thomas Weber wrote: > Hi, > > Am Donnerstag, den 15.06.2006, 12:10 +0200 schrieb Emiliano Olivieri: > > double lower,upper; > > gsl_histogram_get_range (h,gsl_histogram_max_bin (h),&lower,&upper); > > > > > > In this other case, my programs stop with th

Re: [Help-gsl] Freeing up memory used by GSL matrix

2006-06-12 Thread James Bergstra
deallocates the block itself, but also the data that it encapsulates. Your matrix buffer was free'd on line 2, so that's why you get a double free in the else block. -- James Bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl

Re: [Help-gsl] Comments/questions about BFGS algorithm implemented for the GSL

2006-06-08 Thread James Bergstra
hat the todo list has: - implement revised line search as an alternative implementation of "directional_minimize.c" ? - add testing framework for minimization algos - add rosenbrock to test cases -- James Bergstra http://www-etud.iro.umontreal.ca/~bergstrj _

Re: [Help-gsl] gsl_blas_dtrsm

2006-05-28 Thread James Bergstra
at facilitate solving A\B. See the linalg section for docs and examples. There's work going on right now to add QR factoring to linalg, but I think it's not done yet. -- James Bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl

Re: [Help-gsl] Help with GSL Matrices

2006-05-26 Thread James Bergstra
a certain physical location in memory, relative to the first row. This makes many operations fast and easy, but row-swapping isn't one of them. -- James Bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.

Re: [Help-gsl] Help with GSL Matrices

2006-05-25 Thread James Bergstra
ip gsl_matrix_free(B); //B is free'd, but his block isn't -- James Bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl

Re: [Help-gsl] 2d FFTs, DCTs, etc.

2006-05-11 Thread James Bergstra
f you like, I can set you up with a project in libmsl (hosted on savannah). It, already has cvs space, autotools are already configured, etc. Let me know if you like my design idea, and if you'd like admin status in libmsl. I'm supposed to be doing a masters thesis too, but it doesn&#x

Re: [Help-gsl] sum of vector elements using BLAS

2006-05-06 Thread James Bergstra
> i wanna know how to do the sum of vector elements using BLAS. You actually have to do cblas_ddot with a vector of ones. This is one of the motivations for supporting the BLAS Technical forum standard :( -- James Bergstra http://www-etud.iro.umontreal.ca/~bergs

Re: [Help-gsl] Inverse of a matrix

2006-04-30 Thread James Bergstra
A, m) At the end of this procedure M stores inv(sigma). -- james bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl

Re: [Help-gsl] Inverse of a matrix

2006-04-29 Thread James Bergstra
libmsl package. If you want, check out the implementation of the layer_gaussian routine: http://www-etud.iro.umontreal.ca/~bergstrj/msl/html/a4.html#a14 The catch is that layer_gaussian expects that your covariance matrix is already factored on input, eg. it expects L as i

Re: [Help-gsl] I have got problems with library...

2006-04-26 Thread James Bergstra
tion command to read something more like: gcc 1.c -o 1.out -L/path/to/libgsl -lgsl -lgslcblas In passing, these are generic instructions on using gcc, so if you have the same problem with other libraries, try the same fix. Good luck -- james bergstra ht

Re: [Help-gsl] How to do power and exponent of a vector?

2006-04-07 Thread James Bergstra
ctorA)). How can I do this without > using loops? I've written an extension that has exp, and other math.h-ish functions for vectors and matrices. http://www-etud.iro.umontreal.ca/~bergstrj/msl/html/index.html You can try your luck compiling the libs in cvs, or else you can just steal

Re: [Help-gsl] conjugate gradient problem

2006-01-29 Thread James Bergstra
ariable values stops changing it enters the my_f > function succesively more no. of times for each iteration. ... why should it > be like that ?? Good question. I have almost no idea, but you could look at the references in the manual, or even just google for conjugate-gradient. Th

Re: [Help-gsl] 1st attempt at fitting a Gaussian function with GSL.

2005-12-21 Thread James Bergstra
posting, I have a more > complete > test program which I am trying to get working. > > Thanks again. > > -dave miller > > > On Tue, 20 Dec 2005 15:59:26 -0600, James Bergstra > <[EMAIL PROTECTED]> wrote: > > >>> >I need to fit a Gaus

Re: [Help-gsl] 1st attempt at fitting a Gaussian function with GSL.

2005-12-17 Thread James Bergstra
> I need to fit a Gaussian function to an array of data points. What is the nature of your data? Are they just X values or X,Y pairs? -- james bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org h

Re: [Help-gsl] Data Visualization

2005-12-14 Thread James Bergstra
what you then need to do is > > splot "< awk -f addblanks.awk Datafile" > > where the matrix data is stored in Datafile as above but without the > need for blank lines. > > > Hope that helps, > > Peter Melchior > > >

Re: [Help-gsl] GSL and FFTW

2005-12-14 Thread James Bergstra
x > gsl_matrices, is it (which would probably solve my above problem)? > > Regards > Thomas > > > > > ___ > Help-gsl mailing list > Help-gsl@gnu.org > http://lists.gnu.or

Re: [Help-gsl] Data Visualization

2005-12-13 Thread James Bergstra
aid in my original post, that the function I was hoping to call was matlab's imagesc() that renders matrices as pixel maps. Is Gnuplot the right tool for the job? -- james bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing

[Help-gsl] Data Visualization

2005-12-13 Thread James Bergstra
Dimitris' posting about 3D graphics inspires me to ask a related question... What are some good visualization tools for vectors and matrices? I miss the plotting tools in matlab, what can I do instead? James -- james bergstra http://www-etud.iro.umontreal.ca/~ber

Re: [Help-gsl] Vector and matrix views

2005-12-07 Thread James Bergstra
always assumed to be 1, but other than that, the things are analogous. For some reason, a matrix stride (from row to row) is in a field called 'tda'. James Bergstra On Thu, Dec 08, 2005 at 02:17:26AM +0200, Dimitris Papavasiliou wrote: > Hi all, > > I need to quickly and e

Re: [Help-gsl] subscribe

2005-12-06 Thread James Bergstra
Vancouver, B.C. > Canada V6T 2A3 > 1-604-222-1047, ext. 6194 > -- > > > > ___ > Help-gsl mailing list > Help-gsl@gnu.org > http://lists.gnu.org/mailman/

Re: SV: [Help-gsl] On conjugate gradient algorithms in multidimentional minimisation problems.

2005-11-29 Thread James Bergstra
t; This is somewhat related to Part 1. If I look at the convergence by > >the value chi squared takes per iteration, a typical [example] picture > >looks like this: > >50->30->20.1->20.0->19.99->19.981->19.9809-> >for some 100s of iterations>->19.97->19.5->19.0->18.3-> >

Re: [Help-gsl] are multidimensional minimisers threadsafe?

2005-10-18 Thread James Bergstra
l or privileged. Any unauthorised use or disclosure is > prohibited. If you have received this e-mail in error, please delete it > immediately and notify Kane Usher on +61 7 3327 4464. > > > ___ > Help-gsl mailing list > Help

Re: [Help-gsl] gsl vector re-allocation

2005-10-18 Thread James Bergstra
manage to increase an alredy existing gsl_vector? > (I mean, without using plain C arrays). > > Giulio. > ___ > Help-gsl mailing list > Help-gsl@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gsl -- james bergstra http://www-et

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

2005-09-06 Thread James Bergstra
* mat = gsl_matrix_alloc(X->size, X->size); gsl_vector_view diag = gsl_matrix_diagonal(mat); gsl_matrix_set_all(mat, 0.0); //or whatever number you like gsl_vector_memcpy(&diag.vector, X); return mat; } -- james bergstra http://www-etud.iro.umontr

Re: [Help-gsl] Matrix Concatenation

2005-08-15 Thread James Bergstra
g list > Help-gsl@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gsl -- james bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl

Re: [Help-gsl] Compiling GSL with C++

2005-08-04 Thread James Bergstra
ou Yahoo!? > >Tired of spam? Yahoo! Mail has the best spam protection around > >http://mail.yahoo.com > > > > > >___ > >Help-gsl mailing list > >Help-gsl@gnu.org > >http://lists.gnu.org/mailman/listinfo/help-gsl > > > > "Home is not where you are born, but where your heart finds peace" - > Tommy Nordgren, "The dying old crone" > > > > ___ > Help-gsl mailing list > Help-gsl@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gsl -- james bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl

Re: [Help-gsl] Extracting real/imag parts of complex vectors and matrices

2005-07-08 Thread James Bergstra
_ > Help-gsl mailing list > Help-gsl@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gsl -- james bergstra http://www-etud.iro.umontreal.ca/~bergstrj ___ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl