Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3324

array variable as fit parameter?

From Karl Ratzsch <mail.kfr@gmx.net>
Newsgroups comp.graphics.apps.gnuplot
Subject array variable as fit parameter?
Date 2016-05-05 14:30 +0200
Organization solani.org
Message-ID <ngfecb$909$1@solani.org> (permalink)

Show all headers | View raw


Can I directly use an array variable (in 5.1cvs) as a fit parameter,
or is this not (yet) implemented? It'd be highly useful for ploting
a number of datasets along with their fits in one graph.

(Of course i can just use an additional set of regular variables and
function and copy the fit values to an array after each fit.)


  Karl

===

set print $data
plot '+' using 1:(sin(1.23*x)*2.34)
set print
array a[3];array b[3]
f(x)= sin(a[i]*x)*b[i]
i=1
# a[i]=1; b[i=2]
fit f(x) $data via a[i],b[i]

   unknown type in real()

Back to comp.graphics.apps.gnuplot | Previous | Next | Find similar


Thread

array variable as fit parameter? Karl Ratzsch <mail.kfr@gmx.net> - 2016-05-05 14:30 +0200

csiph-web