type = 'case 2'; distrib = 'class1 = (1/i)/sum(1/i); class2 = (1-1/i)/sum(1/i)'; fid = fopen(type, 'w'); %fprintf(fid, 'oneNN\n'); dlmwrite(type,oneNN, '-append'); %fprintf(fid,'\n threeNN \n'); dlmwrite(type,threeNN, '-append'); %fprintf(fid, '\n fiveNN \n'); dlmwrite(type, fiveNN', '-append'); %fprintf(fid, '\n cent \n'); dlmwrite(type, cent, '-append'); %fprintf(fid, '\n avgcent \n'); dlmwrite(type, avgcent, '-append'); %fprintf(fid, '\n centparam \n'); dlmwrite(type, centparam, '-append'); fclose(fid);