Sponsored Content
Top Forums UNIX for Dummies Questions & Answers paste two tables of different sizes and fill blanks with NaN Post 302618901 by Gussifinknottle on Wednesday 4th of April 2012 02:49:02 PM
Old 04-04-2012
Question paste two tables of different sizes and fill blanks with NaN

Hello,

I am pasting two tables of 6x4 and 4x4 together to get a 10x8 output. I want to fill the blank values with a NaN (Not a Number). How can I do this?

Thanks,
Guss
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

blanks in file name

I have a file with a list of filenames. I want to work loopwise through the file and operate on each of the listed files. Normally I'd do something like: for file in `cat $mydir/file-list` do echo $file >> $mydir/my.log cp $mydir/$file $newdir done the problem is that my... (1 Reply)
Discussion started by: LisaS
1 Replies

2. UNIX for Advanced & Expert Users

numbering blanks

hello i'm trying to figure out how to number a blank line. For instance this : sed '/./=' file | sed '/./N; s/\n/ /' gives me 1 aaaa 2 bbbbbb 4 cccccc 5 ffkkkfff 6 ffsdfdfs I would like something like this: 1 aaaaa 2 3 bbbbbb 4 5 cccccc And so... (6 Replies)
Discussion started by: wisher115
6 Replies

3. Shell Programming and Scripting

Converting tables of row data into columns of tables

I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated. Input: test_data_1 1 2 90% 4 3 91% 5 4 90% 6 5 90% 9 6 90% test_data_2 3 5 92% 5 4 92% 7 3 93% 9 2 92% 1 1 92% ... Output:... (7 Replies)
Discussion started by: justthisguy
7 Replies

4. Shell Programming and Scripting

How to use grep to check NAN value and nonexistense element in file

Hi, I have a file which computes fields number and some column produced "nan" I would like to convert the "nan" value to 0 basically. q=`echo $i $j |awk '{printf("%f",($2/($1+$2)))}' The above is the command which I use for computation. However, I would like to check if $1 and $2 is 0, it... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

5. Programming

Blanks vs: Nulls

I'm relatively new to Pro*C programming. In the following example: char name; EXEC SQL SELECT 'John Doe' INTO :name FROM DUAL; "John Doe" is in positions 0-7, blanks in 8-19, and a null in 20. I would really prefer the null to be in position 8 and I don't care what's after that. I wrote a... (1 Reply)
Discussion started by: ebock
1 Replies

6. UNIX for Dummies Questions & Answers

cut and paste from two tables

Hello, I want to be able to cut and paste columns from two tables in one command. Presently I do the following: cut -f 1,3-6,9 table1.in > table1.out cut -f 7,6,1-3 table2.in > table2.out paste table1.out -d '\t' table2.out > MergedTable.out Is there a better way to do this? ... (1 Reply)
Discussion started by: Gussifinknottle
1 Replies

7. Shell Programming and Scripting

Leading blanks

Hi Ich have a list as follows 73 5 100 45 81 4 and I would like to have an output (on screen) like that 73 5 100 45 81 4 (6 Replies)
Discussion started by: lazybaer
6 Replies

8. UNIX for Dummies Questions & Answers

Cacti SNMP Generic OID template, NaN problem

Hello All, I have installed cacti and I have Nan values on created graph. I really appreciate any help. I have done the following: 1. Linux Ubuntu 12.04.2 LTS 64 bits 2. apt-get install cacti // the cacti Version 0.8.7i was installed 3. Accessed "http://MyIP/cacti/index.php" 4. Set SNMP... (0 Replies)
Discussion started by: AndreiM
0 Replies

9. Programming

Strange value of the double type variable: -nan(0x8000000000000)

I am confused by the value of "currdisk->currangle" after adding operation. Initially the value of "currdisk->currangle" is 0.77500000000000013, but after adding operation, it's changed to "-nan(0x8000000000000)", Can anyone explain ? Thanks! The following is the occasion of gdb debugging. 3338 ... (8 Replies)
Discussion started by: 915086731
8 Replies

10. UNIX for Beginners Questions & Answers

awk replace cells with NaN/delete if condition

Hello, I will like to delete/replace $3 with NaN. condition $3>-2000 (file1.dat) to produce out.dat. I want to retain the structure of the table. I use this code, this output only $3. Any idea on how to modify this code. Thank you. awk -v OFS='' '{for(i=1; i<=NF; i++) if ($i > -2000 || $i ==" >... (4 Replies)
Discussion started by: geomarine
4 Replies
NAN(3)							   BSD Library Functions Manual 						    NAN(3)

NAME
nan, nanf, nanl -- quiet NaNs LIBRARY
Math Library (libm, -lm) SYNOPSIS
#include <math.h> double nan(const char *s); float nanf(const char *s); long double nanl(const char *s); DESCRIPTION
The NAN macro expands to a quiet NaN (Not A Number). Similarly, each of the nan(), nanf(), and nanl() functions generate a quiet NaN value without raising an invalid exception. The argument s should point to either an empty string or a hexadecimal representation of a non-nega- tive integer (e.g., "0x1234".) In the latter case, the integer is encoded in some free bits in the representation of the NaN, which some- times store machine-specific information about why a particular NaN was generated. There are 22 such bits available for float variables, 51 bits for double variables, and at least 51 bits for a long double. If s is improperly formatted or represents an integer that is too large, then the particular encoding of the quiet NaN that is returned is indeterminate. COMPATIBILITY
Calling these functions with a non-empty string isn't portable. Another operating system may translate the string into a different NaN encoding, and furthermore, the meaning of a given NaN encoding varies across machine architectures. If you understood the innards of a par- ticular platform well enough to know what string to use, then you would have no need for these functions anyway, so don't use them. Use the NAN macro instead. SEE ALSO
fenv(3), ieee(3), isnan(3), math(3), strtod(3) STANDARDS
The nan(), nanf(), and nanl() functions and the NAN macro conform to ISO/IEC 9899:1999 (``ISO C99''). BSD
December 16, 2007 BSD
All times are GMT -4. The time now is 10:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy