Menu

#1424 Fitting with time data doesn't work

closed-fixed
nobody
None
5
2015-03-23
2014-06-11
No

With version 5 fitting time data doesn't work. Consider the data file fittest.dat with the content:

2014-06-10 1
2014-06-11 2
2014-06-12 3.1

and the script

set timefmt '%Y-%m-%d'
set xdata time
x0=strptime('%Y-%m-%d', '2014-06-10')
f(x) = a*(x-x0) + b
fit f(x) 'fittest.dat' using 1:2 via a,b

This works fine with 4.6.4, but gives an error "Need full using spec for time data" with current CVS version.

Thank you,
Christoph

Discussion

  • Ethan Merritt

    Ethan Merritt - 2014-06-11

    That messages is emitted by a fragment of code that makes very little sense. Perhaps the idea was that the expected full command is

    fit f(x) 'fittest.dat' using 1:2:(1.0) yerror via a,b
    

    I suspect the test, and the message, can be deleted altogether.

     
  • Ethan Merritt

    Ethan Merritt - 2014-06-11
    • status: open --> pending-fixed
     
  • Christoph Bersch

    Thanks, that fixes the problem for me.

     
  • Ethan Merritt

    Ethan Merritt - 2014-06-12
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB