| | |
very new to java - need help
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2005
Posts: 4
Reputation:
Solved Threads: 0
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.
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.
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
•
•
Join Date: Jun 2005
Posts: 4
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- Java 3D Environment (Java)
- Java 3D (Java)
- Java Expert (Needed) (Java)
- Java Chat Reboots (Java)
Other Threads in the Java Forum
- Previous Thread: JAVA animation problem - animating a bezier curve !!!
- Next Thread: 'directed acyclic word graph'??
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api append apple applet application arguments array arrays automation bi binary bluetooth businessintelligence busy_handler(null) chat class classes client code component database draw eclipse encryption equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop main map method methods mobile netbeans newbie number open-source oracle oriented panel print problem program programming project qt recursion reference replaysolutions repositories return robot scanner screen scrollbar se server set singleton size sms socket sort sql string swing test threads time tree utility windows xor





