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 Comment

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).

Sign in to comment.

Answers (1)

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

Categories

Asked:

on 9 May 2012

Community Treasure Hunt

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

Start Hunting!