I realize this is a pretty simple operation, however im totally lost, and no post I could find seem to touch on the exact same subject as mine.

I have a text file, where each line is formatted like so:

float1,float2,float3,float4,float5,float6

Each float is separated by a comma. The number of lines will vary, however there will always be 6 floats per line.

Id like to read this into an array, and then at a later point I want to take the average values of all float1's and all float2's etc.

Once I have all the averages I can output a new 1D array with :

[avgFloat1, avgFloat2, avgFloat3, avgFloat4, avgFloat 5, avgFloat6]

Any hints on where to start with this?

Recommended Answers

So the text "Has this thread been answered?" held no meaning. And the text just below it was unreadable....

Jump to Post

All 3 Replies

Nevermind, the task has now completely changed due to a miscommunication between our coders =)

I cant figure out how to close this thread, but if a mod sees this, please do so.

So the text "Has this thread been answered?" held no meaning. And the text just below it was unreadable....

Or to be a little more specific: You the OP (original poster) have a link at the bottom of the page that allows you to mark the thread solved. I suggest you first post an entry : "This thread marked solved because our requirements changed, not because I got an answer" ; then click that link.

I agree that "solved" isn't exactly what happened, but it is close enough to be useful.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.