C# 当我需要向量时,如何使用矩阵?
我必须对f(x,y)做一个线性化,所以我有一个双[,]。 对于双三次样条插值,我使用alglibC# 当我需要向量时,如何使用矩阵?,c#,C#,我必须对f(x,y)做一个线性化,所以我有一个双[,]。 对于双三次样条插值,我使用alglib public static int Main(string[] args) { // // We use bilinear spline to interpolate f(x,y)=x^2+2*y^2 sampled // at (x,y) from [0.0, 0.5, 1.0] X [0.0, 1.0]. // double[] x = new doub
public static int Main(string[] args)
{
//
// We use bilinear spline to interpolate f(x,y)=x^2+2*y^2 sampled
// at (x,y) from [0.0, 0.5, 1.0] X [0.0, 1.0].
//
double[] x = new double[]{0.0,0.5,1.0};
double[] y = new double[]{0.0,1.0};
double[] f = new double[]{0.00,0.25,1.00,2.00,2.25,3.00};
double vx = 0.25;
double vy = 0.50;
double v;
double dx;
double dy;
double dxy;
alglib.spline2dinterpolant s;
// build spline
alglib.spline2dbuildbicubicv(x, 3, y, 2, f, 1, out s);
// calculate S(0.25,0.50)
v = alglib.spline2dcalc(s, vx, vy);
正如您在alglib.spline2dbuildbicubicv的参数中看到的,f是双精度[]。我需要用may f double[,]来申请
我怎样才能解决这个问题