Search Results

Search: Posts Made By: cosmologist
1,592
Posted By cosmologist
I just noticed that I said it has (127) columns I...
I just noticed that I said it has (127) columns I meant (127!) so it's really huge. Here are the first two lines:


head -2 Dof1651.dat

0.003235 0.003156 0.002684 0.002419 0.002499 0.002548...
1,592
Posted By cosmologist
Absolute and maximum
I have a big file with 127 columns and 869 rows. What I am trying to do is to get the absolute value of all numbers in the file, and then get the maximum of each column.

If this was for one column...
1,228
Posted By cosmologist
Thanks that worked :) I have one last question...
Thanks that worked :)
I have one last question about this, if I want to apply the method to a set o columns (about 125!) do I have to do it for one by one or there is a way to do them all at once.
...
1,228
Posted By cosmologist
This will give me the sum of all. But what I want...
This will give me the sum of all. But what I want is the sum of each entry + Previous to form a column like the one obove. Is that doable?
1,228
Posted By cosmologist
Adding previous results
Hi,

I am trying to use awk to do the following:

For a column:


5
3
4
2
7
I want to start with the first entry then add the second to the first, third to second ..etc:


5
8
12
14...
6,271
Posted By cosmologist
Looks great now :) Thank you very much!
Looks great now :) Thank you very much!
6,271
Posted By cosmologist
Your last solution worked on that set of data :)...
Your last solution worked on that set of data :) Thank you :)

I have one last question about this... If I want to run this on more than one column (about 75 or more), how can I apply it?
When I...
6,271
Posted By cosmologist
I didn't mean the decimals, but the actual...
I didn't mean the decimals, but the actual numbers:

3005.600 3009.200 3012.800

and

3005.6 3012.2 3018.8
6,271
Posted By cosmologist
When I use this set of numbers: 3002.300...
When I use this set of numbers:


3002.300
3002.600
3002.900
3003.200
3003.500
3003.800
3004.100
3004.400
3004.700
3005.000
3005.300
3005.600
3005.900
3006.200
3006.500
3006.800...
6,271
Posted By cosmologist
Thank you for the help :) I tried to apply it...
Thank you for the help :)
I tried to apply it to a larger scale but I think I am missing something...
What I am trying to do is instead of taking the average of every 3 points, I am taking the...
6,271
Posted By cosmologist
Ok, I know what it is that confused me now :) ...
Ok, I know what it is that confused me now :)

So in the example that you mentioned



What I was thinking was:

(1+5+2)/3, (2+6+3)/3, (3+7+4)/3, (4+5+5)/3

[If I am using the mathematical...
6,271
Posted By cosmologist
I read that part and it made sense, but when I...
I read that part and it made sense, but when I applied it to my data I didn't get what I was expecting, so now thinking about it I might have a problem with the mathematical concept itself..

I...
6,271
Posted By cosmologist
I used the code that you suggested: For the...
I used the code that you suggested:
For the data:


3002.000
3002.300
3002.600
3002.900
3003.200
3003.500
3003.800
3004.100
3004.400
3004.700
3005.000
3005.300
3005.600
3005.900...
6,271
Posted By cosmologist
I am sorry I didn't mean to sound rude, the...
I am sorry I didn't mean to sound rude, the reason I took a week is that I was trying to figure it out myself first :(
It is not urgent but I just thought that if more details are needed for my...
6,271
Posted By cosmologist
Any thoughts on this... I am still not able to...
Any thoughts on this... I am still not able to solve it :(:(:(
6,271
Posted By cosmologist
Thanks for your help :) I am trying to apply...
Thanks for your help :)
I am trying to apply this idea to "degrade" the output of a model resolution.

For the sample:

$ vi model.dat


3002.000 1.2874e+32
3002.300 1.2898e+32
3002.600...
6,271
Posted By cosmologist
"Smoothing" the data
Hi!

Is there a way to use awk to "smooth" a set of data? That is, doing what the "SMOOTH" function in IDL does (SMOOTH (http://idlastro.gsfc.nasa.gov/idl_html_help/SMOOTH.html)) ?

Thanks!
3,074
Posted By cosmologist
Is that the same as awk '{print $1}' ? I used the...
Is that the same as awk '{print $1}' ? I used the 2 methods and I get different outputs!
3,074
Posted By cosmologist
This is what I get (it looks like something is...
This is what I get (it looks like something is missing?):



cut -d ' ' -c 1 ResultOfChiNGC1856A.dat
usage: cut -b list [-n] [file ...]
cut -c list [file ...]
cut -f list [-s]...
3,074
Posted By cosmologist
What confuses me is the 8 files were created in...
What confuses me is the 8 files were created in the same exact way (shown below) the sum script works for 6 of them and doesn't work for 2!!
The number of line (wc -l) is 165 as expected. Here is...
3,074
Posted By cosmologist
Getting the sum
I am trying to get the sum of the first column of a file. When I use the same method for other files it works just fine... for some reason for the file below it gives me an error that I don't...
1,970
Posted By cosmologist
Exponents
Hi!

I have a set of numbers like this


1192.0 0.219E+00
1192.0 -0.446E-02
1192.0 0.924E-01
1192.0 -0.306E-01
1192.0 0.105E-03
1192.0 0.819E-01


Is there an easy...
899
Posted By cosmologist
"Playing" with numbers
I am wondering if there is a way to create a file like this somehow without having to type it line by line... It becomes a torture to obtain such a file when i am dealing with large numbers, it would...
1,870
Posted By cosmologist
http://en.wikipedia.org/wiki/Spline_interpolation
http://en.wikipedia.org/wiki/Spline_interpolation
1,870
Posted By cosmologist
interpolting (spline)
Hi,

Does anyone know how I can do an interpolation (with spline) using awk or any other way?

This is part of the sample:


1 1.36064
1.09999 1.44
1.20005 1.84
1.30005 2.0416
1.39997 ...
Showing results 1 to 25 of 152

 
All times are GMT -4. The time now is 08:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy