zzw7394011 发表于 2012-6-7 18:06

怎样用matlab编程统计txt文件中有多少个数

怎样用matlab编程统计txt文件中有多少个数

ChaChing 发表于 2012-6-8 01:21

help fscanf
help length

zzw7394011 发表于 2012-6-10 20:10

回复 2 # ChaChing 的帖子

可以说下具体的程序语句吗

zzw7394011 发表于 2012-6-10 20:11

回复 2 # ChaChing 的帖子

我是新手,毕业设计卡在这里了

ChaChing 发表于 2012-6-10 22:38

本帖最后由 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)

zzw7394011 发表于 2012-6-11 15:15

回复 5 # ChaChing 的帖子

谢谢,解决了
页: [1]
查看完整版本: 怎样用matlab编程统计txt文件中有多少个数