944,192 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1283
  • Java RSS
Jun 12th, 2005
0

very new to java - need help

Expand Post »
I am very new to java and have to create a programme to average data.

The scope is as follows:

I have two .txt files with collumns of data:

file1.txt is something like

2 xxx xxx xxx
3 xxx xxx xxx
4 xxx xxx xxx
...
100 xxx xxx xxx

file2.txt is

10
20
30
...
100

what i need to do is read in both files and average the columns of 2, 3 and 4 from file1.txt, but with refernce to file2.txt, i.e. take the data in column 2 (file1) and it average it for all values between 10 and 20, and again between 20 and 30. Not sure that makes sense, it is quite difficult to explain.
- file1 is a fine resolution, while file2 is a coarser resolution reference (column 1 in both files indicate the resolution) and I want to change the columns 2, 3 and 4 to the same refernce scale as file2 by averaging the data.

I have looked at some basic averaging which will read in some data, average it and output the result, but this problem is a bit more complex.

So what I want to end up with is

outputfile.txt which looks like

10 yyy yyy yyy
20 yyy yyy yyy
30 yyy yyy yyy
...
100 yyy yyy yyy

, where yyy is the averaged data from xxx.


Anybody understand any of that?

Thanks in advance for any help offered.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
spadusca is offline Offline
4 posts
since Jun 2005
Jun 13th, 2005
0

Re: very new to java - need help

is there anything you need help with specifically? we are not here to do your homework, so unless you have a more specific question then forget about it
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Jun 13th, 2005
0

Re: very new to java - need help

fair enough - i understand nobody wants to do other people's work for them, but that's not what I am after it. i just wanted some pointers to set me in the right direction.
The problem is quite complicated and I have looked at all the text book samples which only cover basic averaging.

i only started using java last week with no tuition, just reading a java book and looking at examples. I am working on the problem at will try come up with something, if/when I have something more specific I will post back again.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
spadusca is offline Offline
4 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: JAVA animation problem - animating a bezier curve !!!
Next Thread in Java Forum Timeline: 'directed acyclic word graph'??





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC