You omit to add a semi-column on this line : resize(Imy,217,0)
And you forget to add the number of terms in the naf command. (here I
set 10 terms).
So the script becomes :
x=-pi,pi,pi/108;
y=sin(x);
vnumR Imy;
resize(Imy,217,0);
ff=file_fullname("test-data.txt");
write(ff,"%20.15E %12.8E\n",y,Imy);
_naf_nulin=0;
naf(216,ff,naft1,pi/108,-pi,10, 1,2);
A better way is use the naftab command when numernical vectors are
already existing.
Mickaël