Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Content loss" when importing a .txt-file into Matlab (sums differ)

Status
Not open for further replies.

kerstinm

Industrial
Apr 6, 2006
7
Hello,

when I am importing a .txt-file with one column and about 1 Mio. rows, I am always "losing" some content.

To be a bit more precise: each row contains a figure equal or higher to 0. The sum of the rows' content in my txt-file is 3.598.591 (= total number of trips; I know this figure from my simulation program), while the sum of the rows' content in Matlab, using sum(vector), is only 3.564.907.

Has anyone an idea why I am losing 33.684 trips when I am importing the txt-file into Matlab?

Thanks for your help!
Regards,
Kerstin
 
Replies continue below

Recommended for you

Have you demonstrated the problem with a shorter version of your text file?

Have you re-exported the results you read in, and then compared the two text files with something like winmerge?



Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor