怎样用matlab编程统计txt文件中有多少个数
怎样用matlab编程统计txt文件中有多少个数 help fscanfhelp length 回复 2 # ChaChing 的帖子
可以说下具体的程序语句吗 回复 2 # ChaChing 的帖子
我是新手,毕业设计卡在这里了 本帖最后由 ChaChing 于 2012-6-10 22:40 编辑
LZ有看了help!?
= 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.
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', ); aa_size=length(aa)
回复 5 # ChaChing 的帖子
谢谢,解决了
页:
[1]