function [org_data] = file_manipulation(in_fname, txt_fname, mat_fname)
org_data = round(load(in_fname));
fid = fopen(txt_fname,'wt+');
student_id = '9900';
txt = [txt_fname ' : ' student_id '\nDate of creation:' datestr(now,'dd/mm/yyyy')];
fprintf(fid,'%s',txt);
end
生成的文件不是插入换行符,而是:
C:\w2\test1.txt : 9900\nDate of creation:30/05/2012
我的代码有什么问题?