forum.alglib.net
http://forum.alglib.net/

interpolation spline
http://forum.alglib.net/viewtopic.php?f=2&t=2168
Page 1 of 1

Author:  polluxll [ Tue Nov 11, 2014 7:05 am ]
Post subject:  interpolation spline

/// <summary>
/// x length=n*m
/// y length=n*m
/// z length=n*m
/// z(i)=f(x(i),y(i)) i=0.....n*m-1
/// </summary>
private void Spline_c()
{
int n = 10, m = 12;
int len = n * m;
double[] x = new double[len];[b]

int xIndex = 0;
double[] y = new double[len];
int yIndex = 0;

double[] f = new double[len];
int fIndex = 0;

for (int i1 = 0; i1 < n; i1++)
{
for (int j1 = 0; j1 < m; j1++)
{
x[xIndex] = j1;
xIndex++;
y[yIndex] =i1*new Random().Next();
yIndex++;
f[fIndex] = 100*new Random().NextDouble();
fIndex++;
}
}
// spline f(x,y,f)
}[/b]

Author:  polluxll [ Tue Nov 11, 2014 7:12 am ]
Post subject:  Re: interpolation spline

how to use this method?
alglib.spline2dinterpolant s;
double[] vr;
alglib.spline2dbuildbicubicv(x, n, y, m, f, 1, out s);

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/