读文件
fid=fopen(‘.dat’,’r,);
x=fscanf(fid,‘%g’);
x1=x(i);%i是变量,x中第几个值赋给x1
写文件,写字符串
fid=fopen(‘.dat’,’wt’);
saveREsult=(‘pixel_x=‘,num2str(pixel_x),’\n’);
fprintf(fid,saveResult);
读文件
fid=fopen(‘.dat’,’r,);
x=fscanf(fid,‘%g’);
x1=x(i);%i是变量,x中第几个值赋给x1
写文件,写字符串
fid=fopen(‘.dat’,’wt’);
saveREsult=(‘pixel_x=‘,num2str(pixel_x),’\n’);
fprintf(fid,saveResult);