Increasing Buffersize while importing data
조회 수: 8 (최근 30일)
이전 댓글 표시
I am importing data from txt file to matlab.But the programmme gives error:"Buffer overflow (bufsize = 4095) while reading string from" I am using textscan command in the programme.So buffer size should be increased.how?
댓글 수: 0
답변 (1개)
per isakson
2012년 9월 14일
Hint:
textscan( ..., 'BufSize', new_size )
See the help.
댓글 수: 6
per isakson
2012년 9월 14일
편집: per isakson
2012년 9월 14일
Do you know how many disks you need to store a file of the size, 10^999 bytes? 10^999 is not exactly "multiply by ten".
How large is the file on disk? You do not need a buffer larger than the file!
Did you try
str = fileread( file_spec );
ix = strfind( str, char(10) );
mx = max( ix );
add
sz = size( str )
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!