griddata segmentation fault

David Bateman dbateman at dbateman.org
Mon Dec 29 16:55:37 CST 2008


Chenjie Gu wrote:
> Hi there,
>
> The error after I run the griddata is
> ====================================
> panic: Segmentation fault -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
> Segmentation fault
> ====================================
>
> To reproduce the error, run the following script:
> ====================================
> x = rand(1,100);
> y = rand(1,100);
> z = rand(1,100);
> [xx yy] = meshgrid(0.2:0.1:0.8,0.2:0.1:0.8);
> zz = griddata(x,y,z,xx,yy);
> surf(xx,yy,zz)
> ====================================
>
> I am using octave 3.0.3, I have installed qhull package (2003.1), and 
> the above script runs correctly under matlab.
> (I have tried to change "tri = delaunay (x, y);" to "tri = delaunay 
> (x, y, "QJ");" in "octave/3.0.3/m/geometry/griddata.m", as mentioned 
> in some posts, but it did not work.)
>
> Any ideas to fix this problem?
>
> Chenjie

Works here without a seg-fault if x,y and z are column rather than row 
vectors. That is

x = rand(100,1);
y = rand(100,1);
z = rand(100,1);
[xx yy] = meshgrid(0.2:0.1:0.8,0.2:0.1:0.8);
zz = griddata(x,y,z,xx,yy);
surf(xx,yy,zz)

However, with your code even though there is an error there is no 
seg-fault..

D.

-- 
David Bateman                                dbateman at dbateman.org
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)



More information about the Help-octave mailing list