2.二进制文件输入输出 f_id=fopen('file1.dat','w') t=0:0.01:2 y=3*sin(2*pi*t) fwrite(f_id,[t,y], 'float64') fclose(f_id) f_id=fopen('file1.dat','r') Y=fread(f_id,[201,2], 'float64') fclose(f_id)