diff options
| author | fpi | 2022-03-20 17:48:24 +0100 | 
|---|---|---|
| committer | fpi | 2022-03-28 16:41:13 +0200 | 
| commit | ca14470d16c2c42bc643206e12836aab75bc9622 (patch) | |
| tree | 8b6ad57f4df78c28963f12a4de8d8a0c38a32740 | |
| parent | Run avg init function on startup (diff) | |
Add functions for derivatives
| -rw-r--r-- | gnuplot.org | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/gnuplot.org b/gnuplot.org index 2f8a6bf..58e9dce 100644 --- a/gnuplot.org +++ b/gnuplot.org @@ -57,6 +57,12 @@ avg10(x)=(back10=back9,(samples($0,9)*avg9(x)+back10)/samples($0,10))  avg11(x)=(back11=back10,(samples($0,10)*avg10(x)+back11)/samples($0,11))  avg12(x)=(back12=back11,(samples($0,11)*avg11(x)+back12)/samples($0,12))  #+end_src + +And some derivatives functions. +#+begin_src gnuplot +d(y) = ($0 == 0) ? (y1 = y, 1/0) : (y2 = y1, y1 = y, y1-y2) +d2(x,y) = ($0 == 0) ? (x1 = x, y1 = y, 1/0) : (x2 = x1, x1 = x, y2 = y1, y1 = y, (y1-y2)/(x1-x2)) +#+end_src  * Colors  =podo= is a good standard colorblind friendly colorsequence.  #+begin_src gnuplot  | 
