forum.alglib.net

ALGLIB forum
It is currently Sat Nov 23, 2024 3:43 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: scattered data interpolation by using modified shepard
PostPosted: Thu Mar 07, 2013 7:37 am 
Offline

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,
can you please help to to check where is wrong in my codes.

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)


Attachments:
File comment: data
arp-000.csv [248.95 KiB]
Downloaded 758 times
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 2 guests


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