Hi I have fakebook.csv as following:
F1(current date) F2(popularity) F3(name of book) F4(release date of book)
2006-06-21,6860,"Harry Potter",2006-12-31
2006-06-22,,"Harry Potter",2006-12-31
2006-06-23,7120,"Harry Potter",2006-12-31
2006-06-24,,"Harry Potter",2006-12-31... (0 Replies)
I have a file which is
2
3
4
5
6
6
so i am writing program in C to calculate mean..
#include<stdio.h>
#include<string.h>
#include <math.h>
double CALL mean(int n , double x)
main (int argc, char **argv)
{
char Buf,SEQ;
int i;
double result = 0;
FILE *fp; (3 Replies)
My input:
>AAA_100
10 20 50 60 10 100 15 10
>AAA_100
20 20 50 60 20 100 15 10
>AAA_100
10 20 50 60 40 100 15 10
>AAA_100
40 20 50 60 10 100 15 10
.
.
.
My Output
20 20 50 60 20 100 15 10
If I have a long list of file. I want to calculate average of each position inside the contents... (7 Replies)
Hello,
I'm hoping to get some help on calculating an average time from a list of times (hour:minute:second).
Here's what my list looks like right now, it will grow (I can get the full date or change the formatting of this as well):
07:55:31
09:42:00
08:09:02
09:15:23
09:27:45
09:49:26... (4 Replies)
I want to calculate the average line by line of some files with several lines on them, the files are identical, just want to average the 3rd columns of those files.:wall:
Example file:
File 1
001 0.046 0.667267
001 0.047 0.672028
001 0.048 0.656025
001 0.049 ... (2 Replies)
Hi All
I have this csv file and I need to calculate the average of FPS.
FPS:27.7420, Interval:1314184238772
FPS:25.9798, Interval:1314184242646
FPS:27.4772, Interval:1314184246311
FPS:26.1623, Interval:1314184250159
FPS:26.4515, Interval:1314184253972
FPS:31.5896, Interval:1314184257163... (24 Replies)
Hi, I need help with the awk command.
I have a folder with aprox 500 files each one with two columns and I want to print in a new file, the average of column 1 and average of column 2 and the name of each file.
Input files are:
File-1:
100 99
20 99
50 99
50 99
File-2:
200 85... (3 Replies)
Hello dears,
I have a log file with records like below and want to get a average of one column based on the search of one specific keyword.
2015-02-07 08:15:28 10.102.51.100 10.112.55.101 "kevin.c" POST ... (2 Replies)
My old school way is a one liner. And will search for average from SAR, to get the data receive rate. But, I dont think it is practical or accurate,. Because it calculates to off peak hours. I am planning to change it. My cron runs every 30 mins. When my cron runs, and my time is 14:47pm,, it will... (1 Reply)
Discussion started by: invinzin21
1 Replies
LEARN ABOUT LINUX
pnmconvol
pnmconvol(1) General Commands Manual pnmconvol(1)NAME
pnmconvol - general MxN convolution on a portable anymap
SYNOPSIS
pnmconvol convolutionfile [pnmfile]
DESCRIPTION
Reads two portable anymaps as input. Convolves the second using the first, and writes a portable anymap as output.
Convolution means replacing each pixel with a weighted average of the nearby pixels. The weights and the area to average are determined by
the convolution matrix. The unsigned numbers in the convolution file are offset by -maxval/2 to make signed numbers, and then normalized,
so the actual values in the convolution file are only relative.
Here is a sample convolution file; it does a simple average of the nine immediate neighbors, resulting in a smoothed image:
P2
3 3
18
10 10 10
10 10 10
10 10 10
To see how this works, do the above-mentioned offset: 10 - 18/2 gives 1. The possible range of values is from 0 to 18, and after the off-
set that's -9 to 9. The normalization step makes the range -1 to 1, and the values get scaled correspondingly so they become 1/9 - exactly
what you want. The equivalent matrix for 5x5 smoothing would have maxval 50 and be filled with 26.
The convolution file will usually be a graymap, so that the same convolution gets applied to each color component. However, if you want to
use a pixmap and do a different convolution to different colors, you can certainly do that.
At the edges of the convolved image, where the convolution matrix would extend over the edge of the image, pnmconvol just copies the input
pixels directly to the output.
SEE ALSO pnmsmooth(1), pnm(5)AUTHORS
Copyright (C) 1989, 1991 by Jef Poskanzer.
Modified 26 November 1994 by Mike Burns, burns@chem.psu.edu
26 November 1994 pnmconvol(1)