6-7matlab的程序设计.ppt

6-7matlab的程序设计剖析

FWRITE ? FWRITE Write binary data to file. COUNT = FWRITE(FID,A,PRECISION) writes the elements of matrix A to the specified file, translating MATLAB values to the specified precision. The data are written in column order. COUNT is the number of elements successfully written. 例子: fid = fopen(magic5.bin,wb) fwrite(fid,magic(5),integer*4) 格式说明符 MATLAB的格式说明符包含5部分: % ——引导符(必需) +、-、0——标记(可选) 12.2——宽度与小数位数(可选) s、i、f、e、g——转换字符(必需) \n、%%——表控字符 特殊函数 fgetl,fgets 从文件读入行 feof 判断是否文件末尾 FGETL ? FGETL Read line from file, discard newline chara

文档评论(0)

1亿VIP精品文档

相关文档