Hello,
Awk seem treat the pattern as regular expression, how can awk search not using regular expression? e.g. just represent for "", not "A" or "a" . I don't want to add backslash . (2 Replies)
Hi,
My file has 2 fields and millions of lines.
variableStep chrom=Uextra span=25
201 0.5952
226 0.330693
251 0.121004
276 0.0736858
301 0.0646982
326 0.0736858
401 0.2952
426 0.230693
451 0.221004
476 0.2736858
Each field either has a... (6 Replies)
Hi, I need your help. I've got two files and i need to add 2nd line after occurrence of "Group No X" from data2.txt to 3rd line (after occurrence of "Group No X") from data1.txt. There is the same number of "Groups" in both files and the numbers of groups have the same pattern.
data1.txt
Group... (2 Replies)
I am trying to do some math, so that I can compare the average of six numbers to a variable.
Here is what it looks like (note that when I divide really big numbers, it isn't a real number):
$ tail -n 6 named.stats | awk -F\, '{print$1}'
1141804
1140566
1139429
1134210
1084682
895045... (3 Replies)
Hi I have this list
592;1;Z:\WB\DOCS;/FS3_100G/FILER112/BU/MPS/DOCS;;;;\\FILER112\BUMPS-DOCS\;580,116,544,878 Bytes;656,561 ;77,560
592;2;Z:\WB\FOCUS;/FS3_100G/FILER112/BU/MPS/FOCUS;;;;\\FILER112\BUMPS-FOCUS\;172,430 Bytes;6 ;0 ... (12 Replies)
Anyone ever seen this? Someone mentioned this the other day....
If you do, for instance, in korn shell, echo $(5.2+2.5), it gives the result of 6 regardless.
Can't remember why but it was the limitation of the korn shell. (5 Replies)
Hi expert,
I have log :
TOTAL-TIME : 2125264636
DATA-BYTES-DOWN : 3766111307032
DATA-BYTES-UP : 455032157567
DL = (3766111307032/2125264636)/1024 = 1.73
UL = (455032157567/2125264636)/1024 = 0.21
I want the result :
TOTAL = 1.94 ... (4 Replies)
Hi,
I have the following txt file List_With_Duplicates.txt;
a,1,1
b,3,4
c,5,2
d,6,1
e,3,3
f,3,7
When I run the command
awk -F ',' '{if($2==$3){print $1","$2","$3}}' List_With_Duplicates.txt I get the following output;
a,1,1
e,3,3
This works! as I've compared the 2nd & 3rd... (7 Replies)
Discussion started by: mmab
7 Replies
LEARN ABOUT DEBIAN
symdiff
symdiff(3tcl) Symbolic differentiation for Tcl symdiff(3tcl)__________________________________________________________________________________________________________________________________________________NAME
symdiff - Symbolic differentiation for Tcl
SYNOPSIS
package require Tcl 8.5
package require grammar::aycock 1.0
package require math::calculus::symdiff 1.0
math::calculus::symdiff::symdiff expression variable
math::calculus::jacobian variableDict
_________________________________________________________________DESCRIPTION
The math::calculus::symdiff package provides a symbolic differentiation facility for Tcl math expressions. It is useful for providing de-
rivatives to packages that either require the Jacobian of a set of functions or else are more efficient or stable when the Jacobian is pro-
vided.
PROCEDURES
The math::calculus::symdiff package exports the two procedures:
math::calculus::symdiff::symdiff expression variable
Differentiates the given expression with respect to the specified variable. (See Expressions below for a discussion of the subset of
Tcl math expressions that are acceptable to math::calculus::symdiff.) The result is a Tcl expression that evaluates the derivative.
Returns an error if expression is not a well-formed expression or is not differentiable.
math::calculus::jacobian variableDict
Computes the Jacobian of a system of equations. The system is given by the dictionary variableDict, whose keys are the names of
variables in the system, and whose values are Tcl expressions giving the values of those variables. (See Expressions below for a
discussion of the subset of Tcl math expressions that are acceptable to math::calculus::symdiff. The result is a list of lists: the
i'th element of the j'th sublist is the partial derivative of the i'th variable with respect to the j'th variable. Returns an error
if any of the expressions cannot be differentiated, or if variableDict is not a well-formed dictionary.
EXPRESSIONS
The math::calculus::symdiff package accepts only a small subset of the expressions that are acceptable to Tcl commands such as expr or if.
Specifically, the only constructs accepted are:
o Floating-point constants such as 5 or 3.14159e+00.
o References to Tcl variable using $-substitution. The variable names must consist of alphanumerics and underscores: the ${...} nota-
tion is not accepted.
o Parentheses.
o The +, -, *, /. and ** operators.
o Calls to the functions acos, asin, atan, atan2, cos, cosh, exp, hypot, log, log10, pow, sin, sinh. sqrt, tan, and tanh.
Command substitution, backslash substitution, and argument expansion are not accepted.
EXAMPLES
math::calculus::symdiff::symdiff {($a*$x+$b)*($c*$x+$d)} x
==> (($c * (($a * $x) + $b)) + ($a * (($c * $x) + $d)))
math::calculus::symdiff::jacobian {x {$a * $x + $b * $y}
y {$c * $x + $d * $y}}
==> {{$a} {$b}} {{$c} {$d}}
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math ::
calculus of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may
have for either package and/or documentation.
SEE ALSO
math::calculus, math::interpolate
COPYRIGHT
Copyright (c) 2010 by Kevin B. Kenny <kennykb@acm.org>
Redistribution permitted under the terms of the Open Publication License <http://www.opencontent.org/openpub/>
math 1.0 symdiff(3tcl)