|
本帖最后由 ChaChing 于 2012-6-10 22:40 编辑
LZ有看了help!?
[A,count] = fscanf(fid, format, size) reads the amount of data specified by size, converts it according to the specified format string, and returns it along with a count of values successfully read. size is an argument that determines how much data is read. Valid options are
n Read at most n numbers, characters, or strings.
inf Read to the end of the file.
[m,n] Read at most (m*n) numbers, characters, or strings. Fill a matrix of at most m rows in column order. n can be inf, but m cannot. - fid=fopen('2.txt'); aa=fscanf(fid,'%g', [1 inf]); aa_size=length(aa)
复制代码
|
|