Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Calculating correlations across columns in awk Post 303026254 by Corona688 on Thursday 22nd of November 2018 10:53:32 AM
Old 11-22-2018
Apologies, I thought the data was old data.

By simple correlation you mean pearson's? And does your data file actually have the double-newlines and odd spacing shown?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calculating totals in AWK

Hello, With the following small script I list the size of documents belonging to a certain user by each time selecting the bytes-field of that file ($7). Now it fills the array with every file it finds so in the end the output of some users contains up to 200.000 numbers. So how can I calculate... (7 Replies)
Discussion started by: Hille
7 Replies

2. Shell Programming and Scripting

calculating endless columns

I have about 5000 columns of data that i need to convert all of it into pecentages. for shorter colums i have been using this code: {print $1/($1+$2)*100,$2/($1+$2),$3/($3+$4)*100 .....} but this is a teadious process... is there anyway to do it without having to write all of them out? sample... (20 Replies)
Discussion started by: chronicx
20 Replies

3. Shell Programming and Scripting

Awk program for calculating dates.

Hi All, I have a txt file which has hundreds of lines and 41 fields. I have a requirement to pick up field 14 from the text file which is a date fiels in the following format. Field 14 : Data Type : NUMERIC DATE (YYYYMMDD) Field Length : 8 Example of Data :20090415 Field 42 : Data Type... (2 Replies)
Discussion started by: nua7
2 Replies

4. Shell Programming and Scripting

[Solved] awk calculating between lines

Hey guys, maybe you can help me with this... I want to read input.dat line by line, while doing a simple calculation between the second column value of the current line and the second column value of the next line (like a difference). input is something like this: 0 3.945757 1 ... (1 Reply)
Discussion started by: origamisven
1 Replies

5. Shell Programming and Scripting

Calculating an integer with awk

I would like to extract a number from $0 and calculate if it can be devided by 25. Though the number can also be less then 25 or bigger than 100. How do i extract the number and how can the integer be calculated? String: "all_results">39</span>I am looking for the number between "all_results"> ... (5 Replies)
Discussion started by: sdf
5 Replies

6. Shell Programming and Scripting

AWK way of calculating growth

Hi All, IS there any 'awk' way to manipulate following data? Fruit Date Count Apple 20/08/2011 5 Apple 27/08/2011 7 Apple 05/09/2011 11 Apple 12/09/2011 3 Apple 19/09/2011 25 . . . . Orange 20/08/2011 9 Orange 27/08/2011 20 Orange 27/08/2011 7 Orange 05/09/2011 15 Orange... (3 Replies)
Discussion started by: aniketdixit
3 Replies

7. Shell Programming and Scripting

Calculating the epoch time from standard time using awk and calculating the duration

Hi All, I have the following time stamp data in 2 columns Date TimeStamp(also with milliseconds) 05/23/2012 08:30:11.250 05/23/2012 08:30:15.500 05/23/2012 08:31.15.500 . . etc From this data I need the following output. 0.00( row1-row1 in seconds) 04.25( row2-row1 in... (5 Replies)
Discussion started by: ks_reddy
5 Replies

8. Shell Programming and Scripting

Calculating average with awk

I need to find the average from a file like: data => BW:123 M:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1... (4 Replies)
Discussion started by: Slagle
4 Replies

9. Shell Programming and Scripting

Calculating Running Variance Using Awk

Hi all, I am attempting to calculate a running variance for a file containing a column of numbers. I am using the formula variance=sum((x-mean(x))^2)/(n-1), where x is the value on the current row, and mean(x) is the average of all of the values up until that row. n represents the total number... (1 Reply)
Discussion started by: Jahn
1 Replies

10. UNIX for Dummies Questions & Answers

Calculating cumulative frequency using awk

Hi, I wanted to calculate cumulative frequency distribution of my data that involves several arithmetic calls. I did things in excel but its taking me forever. this is what I want to do: var1.txt contains n observations which I have to compute for frequency which is given by 1/n and subsequently... (7 Replies)
Discussion started by: ida1215
7 Replies
GPIV_IMG2GPIV(1)					      General Commands Manual						  GPIV_IMG2GPIV(1)

NAME
gpiv_img2gpiv - Converts images into raw data (extension .r) format with the belonging ASCII header file (extension .h) or into the hdf format (extension .hdf). SYNOPSIS
gpiv_img2gpiv [-x | --cross] [-c | --cols ncolumns] [--combine] [-h | --help] [-hdf] [--suf_a EXT] [--suf_b EXT] [--suf_num N] [-i | --inverse] [-n] [-p] [-r | --rows nrows] [-t] [-v | --version] file_base_name DESCRIPTION
gpiv_img2gpiv converts images from a common image format (gif, tif etc) into a raw data image with extension .r. Additionally, it generates an ASCII header file (extension .h). This header contains information concerning image dimensions, color depth, single or double image (for auto or cross-correlation), time and spatial scales, position of pixel# (0, 0) in the experiment and some additional (non-required) parame- ters. gpiv_img2gpiv may also convert to hdf formatted images, with extension .hdf, that might be used by gpiv. This program does not use the parameter resources from libgpiv. The default settings may be overruled by the command line options, as explained below. Options -c | --cols ncolumns The number of columns of the image (default 1280). --combine If the images have been obtained separately, but will have to be used for cross-correlation, they will be combined to a single image file for interrogating with gpiv_rr (or gpiv). See also --suf_a/b and --suf_num. -h | --help On-line help. -hdf Converts to (or from) hdf formatted data (extension .hdf). -i | --inverse Inverse conversion; from raw 8-bit data to image format. --suf_a EXT In combination with --combine: the file_base_name of the first frame to be combined is extended with suffix EXT (default: _a). --suf_b EXT In combination with --combine: the file_base_name of the second frame to be combined is extended with suffix EXT (default: _b). --suf_num N In combination with --combine: If images are numbered instead of with --suf_a and --suf_b. N represents the first of the two num- bered frames which will be combined with frame N + 1. The combined image will be named to file_base_nameN.r. So, only odd or even numbered images will result to be loaded in gpiv_rr (or gpiv) for cross-correlation. -n No execute, only print processes. -p Prints process to stdout. -r | --rows nrows The number of rows in the frame of a SINGLE image (default 1024). An image frame containing a PIV pair of images (to be used for cross-correlation) should have the double amount of rows; from row #0 to row #nrows - 1 contains the first image and from row #nrows to row #2xnrows - 1 contains the second image. -t Image type or format (default bmp). -v | --version Print version information on standard output, then exit successfully. -x | --cross Double image for cross-correlation (default: single image for auto-correlation). SEE ALSO
gpivtools NOTES
The program uses convert. AUTHOR
Gerber Van der Graaf 19 Januari 2005 GPIV_IMG2GPIV(1)
All times are GMT -4. The time now is 08:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy