% save nc file
fid = fopen('sphere.nc','w');
for i=1:nsize
fprintf(fid, 'X%.6f\tZ%.6f\n', cutx(i),cutz(i));
end;
fclose(fid);
% save nc file
fid = fopen('sphere.nc','w');
for i=1:nsize
fprintf(fid, 'X%.6f\tZ%.6f\n', cutx(i),cutz(i));
end;
fclose(fid);