Sponsored Content
Top Forums Shell Programming and Scripting How to insert gaussian noise to a data with an order with awk? Post 302676035 by miriammiriam on Tuesday 24th of July 2012 02:56:08 AM
Old 07-24-2012
Hello everybody

Yes there header lines between eveeeery record. Which are starting with date:

Code:
0910 1 2048 32.38 40 20.88  28 35.53  9.62  0.00

This line contains 48 characters.

And the station information is 6 characters also the time information is 6 characters again. This data is an output of f code so the spaces are pre-defined in the code for the station name and the time.

There also lines with

Code:
MOLLP010.640KLYTP311.900TRNMP016.570     0 0.000     0 0.000     0 0.000
     0 0.000     0 0.000     0 0.000     0 0.000     0 0.000     0 0.000

In the first line zeros help the line to be finish till the 72nd character. So the number of the zeros after the last time information is not fixed it depends on the number of the stations recorded for an event.

The second line is a mark between the events. a full line with zeros till the 72 nd character.

Except the full zero lines and header lines all the lines contain station names. A station name can be 4 or 3 character after that information there is another information like P0, S0..... So if the station name is 3 character is becomes :
Code:
ISK P0

Thanks everyone helping me...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

AWK - printing certain fields when field order changes in data file

I'm hoping someone can help me on this. I have a data file that greatly simplified might look like this: sec;src;dst;proto 421;10.10.10.1;10.10.10.2;tcp 426;10.10.10.3;10.10.10.4;udp 442;10.10.10.5;10.10.10.6;tcp sec;src;fac;dst;proto 521;10.10.10.1;ab;10.10.10.2;tcp... (3 Replies)
Discussion started by: eric4
3 Replies

2. Solaris

Not able to insert data

Hi All, I enhanced a perl script that creates a table with xyz_yyyymm and insert data from xyz table before truncate xyz.I have tested it successfully in dev but when i ran it on production new table xyz_yyyymm created but did not insert any records from xyz.(No errors were thrown)The perl... (1 Reply)
Discussion started by: megh
1 Replies

3. Shell Programming and Scripting

How to insert data befor some field in a row of data depending up on values in row

Hi I need to do some thing like "find and insert before that " in a file which contains many records. This will be clear with the following example. The original data record should be some thing like this 60119827 RTMS_LOCATION_CDR INSTANT_POSITION_QUERY 1236574686123083rtmssrv7 ... (8 Replies)
Discussion started by: aemunathan
8 Replies

4. Shell Programming and Scripting

Awk: Data Insert

Hi guys, I'm having some difficulties in insert some details to the following contents. I need to insert "TEST" under MIR & a value "25" to the next line. So far, I am able to insert "TEST" by using awk to capture MIR as the identifier. However, I am having some difficulties in inserting "25"... (3 Replies)
Discussion started by: nantheless
3 Replies

5. Shell Programming and Scripting

Generating Gaussian Distributed Random Numbers

I want to generate an awk function that generated a Gaussian distributed set of random numbers. I need to implement the thing below in awk. Rnd is just a uniform random number between 0 and 1 function rgaussian(r1, r2) { Do v1 = 2 * Rnd - 1 v2 = 2 * Rnd - 1 ... (0 Replies)
Discussion started by: kristinu
0 Replies

6. Shell Programming and Scripting

Help with sort data based on descending order problem

Input file 9.99331e-13 8.98451e-65 9.98418e-34 7.98319e-08 365592 111669 74942.9 0 Desired output 365592 111669 74942.9 7.98319e-08 1.99331e-13 6.98418e-34 (2 Replies)
Discussion started by: perl_beginner
2 Replies

7. Shell Programming and Scripting

how to extract data from numbered files using linux in the numerical order-

Hi experts, I have a list of files containing forces as the only number as follows. Force1.txt Force2.txt Force3.txt Force4.txt Force5.txt . . . . . . . . . Force100.txt I want to put all the data(only a number ) in these forces files in the file with the same order like 1,2,3 ..100 .... (2 Replies)
Discussion started by: hamnsan
2 Replies

8. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies

9. Shell Programming and Scripting

How order a data matrix using awk?

is it possible to order the following row clusters from ascending to descending. thanx in advance input 1 2 4 0 1 2 4 0 3 3 3 3 1 5 1 0 1 5 1 0 6 0 0 0 5 1 1 1... (4 Replies)
Discussion started by: quincyjones
4 Replies

10. Shell Programming and Scripting

Order of data in Spool File

Hello, I have a shell script through which I am executing .sql file and spooling the result of Query from .sql . I want to spool the result in ascending order. Is there any parameter to be set to print result in ascending or descending order. Thanks in advance. (4 Replies)
Discussion started by: Aparna.N
4 Replies
mlib_SignalGaussNoise_S16(3MLIB)			    mediaLib Library Functions				  mlib_SignalGaussNoise_S16(3MLIB)

NAME
mlib_SignalGaussNoise_S16 - Gaussian noise generation SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalGaussNoise_S16(mlib_s16 *gnoise, void *state, mlib_s32 n); DESCRIPTION
The mlib_SignalGaussNoise_S16() function generates one packet of Gaussian noise and updates the internal state. PARAMETERS
The function takes the following arguments: gnoise Generated Gaussian noise array. state Internal state structure. n Length of the generated Gaussian wave array in number of samples. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalGaussNoiseFree_S16(3MLIB), mlib_SignalGaussNoiseInit_S16(3MLIB), attributes(5) SunOS 5.10 9 Nov 2004 mlib_SignalGaussNoise_S16(3MLIB)
All times are GMT -4. The time now is 06:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy