Menu

#1222 value() statement in fit .. via value() is not evaluated

closed-invalid
nobody
None
5
2015-03-23
2013-03-15
No

If the variable name in a fit command is given as "value('varname'), statement is not evaluated, and an error message

Singular matrix in Givens()
error during fit

appears, when the same variable name without the "value" statement works. more a feature than a bug, no doubt, but i guess it´s an easy fix anyway.
gp is official 4.6.0 windows build

example:

a=2

fit a "-" via value("a")
1 2
1 3
1 2
e

Related

Bugs: #1222

Discussion

  • Ethan Merritt

    Ethan Merritt - 2013-03-15

    Your fit command makes no sense.
    "fit a" is already incorrect, because a is not a function,
    and the "via" part is also incorrect because it wants the
    name of a variable, not a numeric value.

     
  • Ethan Merritt

    Ethan Merritt - 2013-03-15
    • status: open --> closed-invalid
     
  • Karl Ratzsch

    Karl Ratzsch - 2013-03-15

    Am 15.03.2013 16:31, schrieb Ethan Merritt:

    Your fit command makes no sense.
    "fit a" is already incorrect, because a is not a function,

    "fit a" works, and should work. You can define the function to be fitted
    in the fit command itself, and f(x) = a is a valid function.

    and the "via" part is also incorrect because it wants the
    name of a variable, not a numeric value.

    You´re right. I was too proud of having found a way emulate array
    variables to notice that. ;-)

    Then it it probably not a two-liner to get that to work. File it as a
    feature request?

    Regards, Karl


    [bugs:#1222] http://sourceforge.net/p/gnuplot/bugs/1222/ value()
    statement in fit .. via value() is not evaluated

    Status: open
    Created: Fri Mar 15, 2013 01:27 PM UTC by kf2402
    Last Updated: Fri Mar 15, 2013 01:27 PM UTC
    Owner: nobody

    If the variable name in a fit command is given as "value('varname'),
    statement is not evaluated, and an error message

    Singular matrix in Givens()
    error during fit

    appears, when the same variable name without the "value" statement
    works. more a feature than a bug, no doubt, but i guess it´s an easy fix
    anyway.
    gp is official 4.6.0 windows build

    example:

    a=2

    fit a "-" via value("a")
    1 2
    1 3
    1 2
    e


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/gnuplot/bugs/1222/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

    --
    Karl-Friedrich Ratzsch (Dipl. Chem.)
    Freiburger Materialforschungszentrum / Universität Freiburg
    Stefan-Meier-Straße 21, 79104 Freiburg im Breisgau
    Tel. 0761/203-4748 Fax:-4701
    ratzsch@uni-freiburg.de

     

    Related

    Bugs: #1222


Log in to post a comment.