Matlab的fwrite()函数和fread()函数都是将从文件中读进来的数据按列顺序存放在矩阵中的。

A = FREAD(FID,SIZE) reads the number of elements specified by SIZE. Valid entries for SIZE are:

N read N elements into a column vector.

inf read to the end of the file.

[M,N] read elements to fill an M-by-N matrix, in column order.

N can be inf, but M can't.

 

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.

posted on 2010-11-15 22:17  尛尛蟲  阅读(11785)  评论(0)    收藏  举报