function [x,y,z] = get_points(filename) % read set of points from a file (each line x,y,z coordinates) % and return the results in 3 arrays x,y, and z % fid = fopen(filename); crd = fscanf(fid,'%f'); dim = length(crd); x = crd(1:3:dim-2); y = crd(2:3:dim-1); z = crd(3:3:dim);