Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread wally
"parametrization" sounds good, but i'm not a mathematic. On Monday, May 23, 2011 18:40:55 Jussi Lahtinen wrote: > Rootfinder is not way to go... > You may have to implement peak finder by yourself. > Though, I suggest to google for ready algorithms, at best you may just have > to do parametrizat

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread Jussi Lahtinen
Sounds like you need to use statistical methods to find what you need. Jussi On Mon, May 23, 2011 at 19:34, wally wrote: > Jussi, > > here is a screenshot from a peakgenerator made in gambas3. > i use this to generate data similar to this i get from HPLC detector. > i can send the data from t

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread Jussi Lahtinen
Rootfinder is not way to go... You may have to implement peak finder by yourself. Though, I suggest to google for ready algorithms, at best you may just have to do parametrization for peaks/noise/etc. Jussi On Mon, May 23, 2011 at 18:55, wally wrote: > Jussi, > > i try to analyze some spectro

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread wally
and have some fun with maths :) On Monday, May 23, 2011 17:48:24 Jussi Lahtinen wrote: > > actuakky i have problem to pass the splines to rootfinder > > What you are exactly trying to achieve? > Rootfinder tries to find root of function, it doesn't eat data as such... > For data just seek for ze

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread wally
Jussi, i try to analyze some spectrographic data. Mainly peakfinding, start of peak end of peak, integral between start and end of sigle peak in numerical data containing unknown number of peaks and of course noise. wally On Monday, May 23, 2011 17:48:24 Jussi Lahtinen wrote: > > actuakky i

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread Jussi Lahtinen
> actuakky i have problem to pass the splines to rootfinder > What you are exactly trying to achieve? Rootfinder tries to find root of function, it doesn't eat data as such... For data just seek for zero. Jussi -- What Ev

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread Fabien Bodard
2011/5/23 richard terry : > On Monday 23 May 2011 18:49:18 wally wrote: > > What's this example meant to do/show. > > I've installed and tried to run it and nothing happens. > > I seem to have according to synaptic GNU Scientific Library (GSL) -- library > package installed. > > Can your demo do so

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread wally
do some left-mouse-clicks on the drawingarea and push button cspline On Monday, May 23, 2011 11:23:08 richard terry wrote: > On Monday 23 May 2011 18:49:18 wally wrote: > > What's this example meant to do/show. > > I've installed and tried to run it and nothing happens. > > I seem to have ac

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread richard terry
On Monday 23 May 2011 18:49:18 wally wrote: What's this example meant to do/show. I've installed and tried to run it and nothing happens. I seem to have according to synaptic GNU Scientific Library (GSL) -- library package installed. Can your demo do some sort of check on this and then popup s

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-23 Thread wally
should i post the remaining gsl-interpolation group examples here ? (linear, polynomial, akima,derivation, integral ) actuakky i have problem to pass the splines to rootfinder wally On Sunday, May 22, 2011 23:57:49 Benoît Minisini wrote: > > Hmmm official example doesn't have this problem

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread Benoît Minisini
> Hmmm official example doesn't have this problem..? > What is the difference? > > Jussi > Beside a few GUI changes, no difference at all. When do you get that message exactly? -- Benoît Minisini -- What Every C/

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread Jussi Lahtinen
Hmmm official example doesn't have this problem..? What is the difference? Jussi On Sun, May 22, 2011 at 21:43, Jussi Lahtinen wrote: > For some reason I get error message with this code; > "The program has returned value 127." > And then to console; > "gsl_interp_cspline_demo: symbol looku

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread Jussi Lahtinen
For some reason I get error message with this code; "The program has returned value 127." And then to console; "gsl_interp_cspline_demo: symbol lookup error: /usr/lib/libQtGui.so.4: undefined symbol: _ZN18QThreadStorageDataD1Ev" Gambas 3 rev 3856 @ Ubuntu 11.04 64bit Jussi On Sun, May 22, 201

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread wally
ok, done On Sunday, May 22, 2011 16:41:39 Benoît Minisini wrote: > > clear button added > > I'd like to use it as an example. Can you just do the following changes: > > - Add an about box with your name. > > - Use "libgsl:0" as library name, otherwise the example will need the > libgsl develo

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread Benoît Minisini
> clear button added > I'd like to use it as an example. Can you just do the following changes: - Add an about box with your name. - Use "libgsl:0" as library name, otherwise the example will need the libgsl development packages. Thanks in advance. Regards, -- Benoît Minisini

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread wally
clear button added On Sunday, May 22, 2011 14:14:37 Jussi Lahtinen wrote: > Nice work. > Code quality is good, this could be official demo for using external > libraries. > Only "clear" button is missing. > > Jussi > > On Sun, May 22, 2011 at 10:09, wally wrote: > > here is a gambas3 demo of g

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread wally
ok , i'll add clear button the remaining interpolation types are ready. also derivative of interpolation now adding derivative2 and integral of interpolation then i'll try rootfinding wally On Sunday, May 22, 2011 14:14:37 Jussi Lahtinen wrote: > Nice work. > Code quality is good, this could be

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread Jussi Lahtinen
Nice work. Code quality is good, this could be official demo for using external libraries. Only "clear" button is missing. Jussi On Sun, May 22, 2011 at 10:09, wally wrote: > > here is a gambas3 demo of gsl cspline. > wally > > > ---

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread John Spikowski
On Sun, 2011-05-22 at 09:09 +0200, wally wrote: > here is a gambas3 demo of gsl cspline. > wally Here is a working ScriptBasic Windows version (running under Wine) using the DYC extension module for the FFI. (GTK-Server was the issue under Ubuntu 64) Code: (testgsl.sb) DECLARE SUB DLL ALIAS "d

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-22 Thread wally
here is a gambas3 demo of gsl cspline. wally gsl_interp_cspline_demo-0.0.1.tar.gz Description: application/compressed-tar -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread John Spikowski
On Sun, 2011-05-22 at 00:38 +0300, Jussi Lahtinen wrote: > Just use Gambas to solve the problem! > > Jussi ScriptBasic is < 500KB soaking wet. ;-) -- What Every C/C++ and Fortran developer Should Know! Read this artic

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Jussi Lahtinen
Just use Gambas to solve the problem! Jussi On Sun, May 22, 2011 at 00:10, John Spikowski wrote: > On Sat, 2011-05-21 at 22:27 +0300, Jussi Lahtinen wrote: > > Gambas! > > http://www.wolframalpha.com/input/?i=besselj0%285%29 > > > > Jussi > > > > Here is the result of the C version. > > gcc -Wa

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread John Spikowski
On Sat, 2011-05-21 at 22:27 +0300, Jussi Lahtinen wrote: > Gambas! > http://www.wolframalpha.com/input/?i=besselj0%285%29 > > Jussi > Here is the result of the C version. gcc -Wall intro.c -lgslcblas -lgsl -o intro J0(5) = -1.775967713143382642471124199801124632358551025391e-01 For grins I DE

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread John Spikowski
On Sat, 2011-05-21 at 22:27 +0300, Jussi Lahtinen wrote: > Gambas! > http://www.wolframalpha.com/input/?i=besselj0%285%29 > > Jussi Thanks for testing. Now I need to determine if the FORMAT() function is the problem or GTK-Server and the return of a DOUBLE. Good to know these things early in the

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Jussi Lahtinen
Gambas! http://www.wolframalpha.com/input/?i=besselj0%285%29 Jussi On Sat, May 21, 2011 at 22:24, John Spikowski wrote: > On Sat, 2011-05-21 at 22:04 +0300, Jussi Lahtinen wrote: > > And BTW, Gambas gives more accurate result! > > Gambas; -0.177596771314338 > > Actual; > -0.1775967713143383043

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread John Spikowski
On Sat, 2011-05-21 at 22:04 +0300, Jussi Lahtinen wrote: > And BTW, Gambas gives more accurate result! > Gambas; -0.177596771314338 > Actual;-0.177596771314338304347397013074758711071130356008509128990... > > Jussi > J0(5) = -1.7759700326156879282279987819492816925049e-01 I would be

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread John Spikowski
On Sat, 2011-05-21 at 20:04 +0200, wally wrote: > never met scriba but installed and tried your bessel: > error &H10:The requested module can not be loaded. > seems i should read some docs and load some modules first :) > > wally You can get what you need from here. SB64 http://www.scriptbasic.

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread wally
sorry, messed up John and Jussi :) On Saturday, May 21, 2011 20:48:33 John Spikowski wrote: > On Sat, 2011-05-21 at 20:04 +0200, wally wrote: > > never met scriba but installed and tried your bessel: > > error &H10:The requested module can not be loaded. > > seems i should read some docs and l

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Jussi Lahtinen
And BTW, Gambas gives more accurate result! Gambas; -0.177596771314338 Actual;-0.177596771314338304347397013074758711071130356008509128990... Jussi On Sat, May 21, 2011 at 22:01, Jussi Lahtinen wrote: > Not me, it's John! > I have no need for other basic, even if I don't need GUI, Gambas i

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Jussi Lahtinen
Not me, it's John! I have no need for other basic, even if I don't need GUI, Gambas is my option. Why not to do command line programs with Gambas!?? It's much easier and simpler!!! This is all you need in Gambas: Extern gsl_sf_bessel_J0(x As Float) As Float In "libgsl:0" Public Sub Main() Prin

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread John Spikowski
On Sat, 2011-05-21 at 20:04 +0200, wally wrote: > never met scriba but installed and tried your bessel: > error &H10:The requested module can not be loaded. > seems i should read some docs and load some modules first :) > You need the following to run my example. * GTK-Server extension module.

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread wally
On Saturday, May 21, 2011 18:54:03 John Spikowski wrote: > On Sat, 2011-05-21 at 18:27 +0200, wally wrote: > > Jussi, > > > > GSL is grouped in similar functions and i think if one member of a group > > works already, the remaining members should work also with similar code. > > I will try to make

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread John Spikowski
On Sat, 2011-05-21 at 18:27 +0200, wally wrote: > Jussi, > > GSL is grouped in similar functions and i think if one member of a group > works already, the remaining members should work also with similar code. > I will try to make an emsemble of gb3 snippets and see what else is necessary > to cove

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread wally
Jussi, GSL is grouped in similar functions and i think if one member of a group works already, the remaining members should work also with similar code. I will try to make an emsemble of gb3 snippets and see what else is necessary to cover at least some main features of GSL. wally On Saturday,

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Jussi Lahtinen
"Free(pData)" is missing from end of the code... Jussi On Sat, May 21, 2011 at 18:13, Jussi Lahtinen wrote: > Wally, use this version instead! > I think I was bit too tired to make sense... this puts the struct to > stream, no stupid hacks needed. > > Jussi > > > > > On Sat, May 21, 2011 at 14:

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Jussi Lahtinen
Wally, use this version instead! I think I was bit too tired to make sense... this puts the struct to stream, no stupid hacks needed. Jussi On Sat, May 21, 2011 at 14:42, wally wrote: > On Saturday, May 21, 2011 12:35:34 Benoît Minisini wrote: > > > Good morning Jussi, > > > > > > thank you f

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread wally
On Saturday, May 21, 2011 12:35:34 Benoît Minisini wrote: > > Good morning Jussi, > > > > thank you for this solution. > > > > Don't you think, that a "gb.gsl" component would be from general interest > > ? Benoit, what is your opinion ? > > > > wally > > Of course. Any volunteer ? I have eno

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Jussi Lahtinen
I don't think I have enough time to do it by myself, but I'm willing to help. Jussi 2011/5/21 Benoît Minisini > > Good morning Jussi, > > > > thank you for this solution. > > > > Don't you think, that a "gb.gsl" component would be from general interest > ? > > Benoit, what is your opinion ? >

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-21 Thread Benoît Minisini
> Good morning Jussi, > > thank you for this solution. > > Don't you think, that a "gb.gsl" component would be from general interest ? > Benoit, what is your opinion ? > > wally > Of course. Any volunteer ? -- Benoît Minisini -

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-20 Thread wally
Good morning Jussi, thank you for this solution. Don't you think, that a "gb.gsl" component would be from general interest ? Benoit, what is your opinion ? wally On Saturday, May 21, 2011 01:08:52 Jussi Lahtinen wrote: > Corrected (and working) version attached. > Though I'm not fully satisfi

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-20 Thread Jussi Lahtinen
Hmmm but then there should be also some kind of Struct@ function. Doesn't sound easy to implement! Jussi On Sat, May 21, 2011 at 02:08, Jussi Lahtinen wrote: > Corrected (and working) version attached. > Though I'm not fully satisfied to it. Benoit, is it possible to have > pointer to struc

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-20 Thread Jussi Lahtinen
Corrected (and working) version attached. Though I'm not fully satisfied to it. Benoit, is it possible to have pointer to struct with varptr? Right now it cannot be done..? If you look at that attachment you will see why it would be useful... Jussi On Fri, May 20, 2011 at 13:57, wally wrote:

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-20 Thread wally
Of course i want to try some other functionality of GSL too. and of course I'm too stupid :) now 1st derivative the code contains also the working C original and the necessary header files containing the necessary definitions. error message is : FMain class line 50 "VarPtr() argument must be a

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread Jussi Lahtinen
OK, just wondering how to avoid creating false dependency on some library version. Meaning, if something can be done with some library with any version 1, 2 or 3, and still you must specify one of them. Hmmm... "locate libgsl" finds it "/usr/lib32/libgsl.so", maybe it is ignored because of 32bit v

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread Benoît Minisini
> Seems to work (Gambas 3 rev 3850 @ Ubuntu 10.10 64bit), though, I haven't > check if the results are correct. > I'm out of time. > > Source attached. > > BTW. Why 'Library "libgsl"' doesn't find *any* library? However 'Library > "libgsl:0"' does! > > Jussi > Because "libgsl" means "/usr/lib/

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread Jussi Lahtinen
Seems to work (Gambas 3 rev 3850 @ Ubuntu 10.10 64bit), though, I haven't check if the results are correct. I'm out of time. Source attached. BTW. Why 'Library "libgsl"' doesn't find *any* library? However 'Library "libgsl:0"' does! Jussi On Wed, May 18, 2011 at 18:53, wally wrote: > > Yes,

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread wally
Yes, few surprises in direction science are highly appreciated :) I have compile problems with the new "extern" At revision 3850.OpenSuse 11.3 gambas3_svn/trunk/main/gbx/gbx_c_application.c:401: undefined reference to `EXTERN_get_symbol' collect2: ld returned 1 exit status wally On Wedne

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread Jussi Lahtinen
Benoit keeps on amazing us! Jussi P.S. I haven't test it yet... On Wed, May 18, 2011 at 18:21, wally wrote: > > Thanks a lot ! :) > wally > > On Wednesday, May 18, 2011 17:07:09 Benoît Minisini wrote: > > > Hello Jussi, > > > > > > in C the stuff works pretty nice, so i agree to your suggest

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread wally
Thanks a lot ! :) wally On Wednesday, May 18, 2011 17:07:09 Benoît Minisini wrote: > > Hello Jussi, > > > > in C the stuff works pretty nice, so i agree to your suggestion 2. > > > > Do all math stuff directly in Gambas is an option i should check. > > > > I think i mentioned that i use Ga

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread Benoît Minisini
> Hello Jussi, > > in C the stuff works pretty nice, so i agree to your suggestion 2. > > Do all math stuff directly in Gambas is an option i should check. > > I think i mentioned that i use Gambas3 and want to make interpolations, > derivatives and integrals from an integrarray. > The array co

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-18 Thread Jussi Lahtinen
No, AFAIK there is nothing that returns value for pointer, like in your case. Jussi 2011/5/18 Phạm Quang Dương > Hope this help :) > The key is Pointer. > > 2011/4/9 Benoît Minisini > > > > aStruct * anExternFunc(...) > > > > with: > > > > aStruct { > > > > aClass *data > > aStruct *previous

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-17 Thread Phạm Quang Dương
Hope this help :) The key is Pointer. 2011/4/9 Benoît Minisini > > aStruct * anExternFunc(...) > > with: > > aStruct { > > aClass *data > aStruct *previous > aStruct *next > } > > > How to get all *data > I tried > > pNext = anExternFunc(...) > while pNext <> null > > pData = Pointer@(pNext) > >

[Gambas-user] Gambas3 and Gnu scientific library

2011-05-16 Thread wally
Hello Jussi, in C the stuff works pretty nice, so i agree to your suggestion 2. Do all math stuff directly in Gambas is an option i should check. I think i mentioned that i use Gambas3 and want to make interpolations, derivatives and integrals from an integrarray. The array contains ADC outp

Re: [Gambas-user] Gambas3 and Gnu scientific library

2011-05-16 Thread Jussi Lahtinen
Not very easy task... Here is interpolation example in C. http://www.gnu.org/software/gsl/manual/html_node/Interpolation-Example-programs.html As you can see, you need to call several functions to get what you want. Declaring those in Gambas is OK, *except* determining interpolation type! You can

[Gambas-user] Gambas3 and Gnu scientific library

2011-05-15 Thread wally
Hello, i need to process an integerarray using GSL (Gnu Scientific Library) but i do not know how to do it. Does anybody have a code example how to provide the array data to gsl and get back interpolation, derivative and integral data ? wally ---