From: Paul W. B. <pa...@pu...> - 2008-03-13 14:57:47
|
Hello again, i discovered an error and now I am able to use the 2-dimensional array zg right. The problem is still the griddata function. Something is wrong there. The running program is killed calling the griddata function. Regards, Paul. P.S.: My actual Code: (cd is a ContourableData object which extends Contourable_Data). pls = new plstream(); pls->init(); PLFLT *x, *y, *z; PLINT n = cd.count(); x = cd.get_x(); y = cd.get_y(); z = cd.get_value(); const PLINT nn = 20; PLFLT *xg = new PLFLT[nn]; PLFLT *yg = new PLFLT[nn]; PLFLT **zg; pls->plAlloc2dGrid(&zg, nn, nn); double step = 2*28/((double)n-1); for(int i = 0; i < nn; i++){ double val = -28 + step*(double)i; xg[i] = val; yg[i] = val; } pls->griddata(x, y, z, n, xg, nn, yg, nn, zg, GRID_DTLI, 0.0); |