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
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
2012-5-9
0 个投票
nanmean() is not part of basic MATLAB. It is part of the Stats toolbox.
类别
在 帮助中心 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!