Matlab 2012a loading all text file data into one row

I have been working with a Matlab script in version R2011b that creates matrices out of text files. This script has been working fine in this older version of Matlab, but when I go to run the same exact script with the same text files in the R2012a version, I get the following error message:
"Undefined function 'nanmean' for input arguments of type 'double'."
It looks as if Matlab is combining all the different rows of information within the text file into one row with 2000 columns. So, it's reading it as:
a b c d e f g h i
instead of:
a b c
d e f
g h i
Does anyone know what the error message means, or how to get this version of Matlab to recognize new rows in the text file?

댓글 수: 1

Geoff
Geoff 2012년 5월 10일
Please post your code that reads the data. Sounds like it's treating new-line character(s) as an ordinary delimiter, or it is expecting CRLF (Windows-style) where the file has only LF (Linux-style / Mac OS-X) or CR (Mac OS-9 and earlier).

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2012년 5월 9일

0 개 추천

nanmean() is not part of basic MATLAB. It is part of the Stats toolbox.

카테고리

도움말 센터File Exchange에서 Text Data Preparation에 대해 자세히 알아보기

질문:

2012년 5월 9일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by