forum.alglib.net

ALGLIB forum
It is currently Thu Aug 11, 2022 6:02 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: use Numerical Integration with an array instead of a functio
PostPosted: Fri Mar 29, 2013 2:16 pm 
Offline

Joined: Fri Mar 29, 2013 1:58 pm
Posts: 1
Hi All,

I am a new user and I am wanting to use ALGLIB with excel. At the moment I am learning to use ALGLIB with VB.NEXT (VB express 2010), then eventually with excel.

In excel I would like to integrate a curve that has been generated from experimental data (it does not have a function associated).

At the moment I can get the AutoGKSmooth to work with a function Math.Exp(i). But I would like to use this function with an array of values instead of a function. (So eventually load the experimental data from excel in to the array then integrate this data). For example I have tried this, but it does not work:

Code:
    Public Sub testAlGLIB()
        Dim s As autogkstate = New XAlglib.autogkstate() ' initializer can be dropped, but compiler will issue warning
        Dim v As Double
        Dim rep As autogkreport = New XAlglib.autogkreport() ' initializer can be dropped, but compiler will issue warning
        Dim i As Double

        XAlglib.autogksmooth(1, 2, s)
      
        ' I need to find out how to load the cell values in to the Alglib function
        ' ?? array, or something else ??
        For i = 1 To 2 Step 0.1
            s.csobj.x = Math.Exp(i)
        Next

        XAlglib.autogkiteration(s)
        XAlglib.autogkresults(s, v, rep)
        System.Console.WriteLine(v)            'msgbox(v) in excel
    End Sub


Any help would be much appreciated.

Thanks,

Kane


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group