forum.alglib.net

ALGLIB forum
 It is currently Thu Jul 07, 2022 3:56 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.

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: scattered data interpolation by using modified shepardPosted: Thu Mar 07, 2013 7:37 am

Joined: Thu Mar 07, 2013 7:27 am
Posts: 1
Hi Sir,

I'm testing to use Alglib for a 300x300 2D scattered data interpolation ,
I reference to this thread http://forum.alglib.net/viewtopic.php?f=2&t=59
and tried to convert it to vb.net,
unfortunately, I got the output with no changes of original data,

thanks!

'export_array(a) , a is a (300,300) please refer to data file.

Dim z1 As idwinterpolant
Dim nx As Integer = 2
Dim d As Integer = 2
Dim n As Integer = 301 * 301 - 1
Dim nq As Integer = 30
Dim nw As Integer = 50
Dim idwerrors As Boolean = False

Dim xy(n, nx) As Double
Dim k As Integer = 0
Dim x(1) As Double
Dim i As Integer, j As Integer

For i = 0 To 300
For j = 0 To 300
xy(k, 0) = i
xy(k, 1) = j
xy(k, 2) = a(i, j)
k += 1
Next
Next

'//////////////////////////////////////////////////////
'// build interpolant
'//////////////////////////////////////////////////////
idwbuildmodifiedshepard(xy, n, nx, d, nq, nw, z1)

For i = 0 To n
x(0) = xy(i, 0)
x(1) = xy(i, 1)
a(xy(i, 0), xy(i, 1)) = idwcalc(z1, x)
'idwerrors = ap::fp_neq(val, xy(i,nx));
Next

' export_array(a)

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 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 forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for: