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


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

Re: Defining multiple similar functions, and fitting them, using a for loop

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Defining multiple similar functions, and fitting them, using a for loop
Followup-To comp.graphics.apps.gnuplot
Date 2013-03-15 11:52 -0700
Organization gnuplot development team
Message-ID <khvqi6$fd1$1@dont-email.me> (permalink)
References <52d92c72-a809-490f-86e9-c577132ffa44@googlegroups.com> <khujr6$1dr$1@news.rz.uni-karlsruhe.de> <khvfvb$ch6$1@news.rz.uni-karlsruhe.de>

Followups directed to: comp.graphics.apps.gnuplot

Show all headers | View raw


Karl wrote:

> Am 15.03.2013 08:49, schrieb Karl:
>> fit f(x,i) fname(i) via value("m".i), value("b".i)
> 
> This of course cannot work. "value" returns the value stored in the
> variable, and not it´s name.
> Should have noticed that myself.

You could use macros, however:

set macro
var1 = "m".i
var2 = "b".i

fit f(x,i) fname(i) via @var1, @var2


	Ethan

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


Thread

Defining multiple similar functions, and fitting them, using a for loop Thomas Grant <tomer485@gmail.com> - 2013-03-14 10:34 -0700
  Re: Defining multiple similar functions, and fitting them, using a for loop Karl <mail.kfr@gmx.net> - 2013-03-15 08:49 +0100
    Re: Defining multiple similar functions, and fitting them, using a for loop Karl <mail.kfr@gmx.net> - 2013-03-15 08:59 +0100
    Re: Defining multiple similar functions, and fitting them, using a for loop Karl <mail.kfr@gmx.net> - 2013-03-15 14:45 +0100
    Re: Defining multiple similar functions, and fitting them, using a for loop Karl <mail.kfr@gmx.net> - 2013-03-15 16:50 +0100
      Re: Defining multiple similar functions, and fitting them, using a for loop sfeam <sfeam@users.sourceforge.net> - 2013-03-15 11:52 -0700
  Re: Defining multiple similar functions, and fitting them, using a for loop kress.florian@gmail.com - 2013-05-23 13:03 -0700
    Re: Defining multiple similar functions, and fitting them, using a for loop sfeam <sfeam@users.sourceforge.net> - 2013-05-23 15:34 -0700

csiph-web