Hello
I want to approximate a list with date and numbers with function x(t) = a + b*(t)^0.3
I wrote the following code.
data22 = {{{2007, 1, 16}, 12582.59`}, {{2007, 1, 17},
12577.15`}, {{2007, 1, 18}, 12567.93`}, {{2007, 1, 19},
12565.53`}, {{2007, 1, 22}, 12477.17`}, {{2007, 1, 23},
12533.8`}, {{2007, 1, 24}, 12621.77`}, {{2007, 1, 25},
12502.56`}, {{2007, 1, 26}, 12487.02`}, {{2007, 1, 29},
12490.78`}, {{2007, 1, 30}, 12523.31`}, {{2007, 1, 31},
12621.69`}, {{2007, 2, 1}, 12673.68`}, {{2007, 2, 2},
12653.49`}, {{2007, 2, 5}, 12661.74`}, {{2007, 2, 6},
12666.31`}, {{2007, 2, 7}, 12666.87`}, {{2007, 2, 8},
12637.63`}, {{2007, 2, 9}, 12580.83`}, {{2007, 2, 12},
12552.55`}, {{2007, 2, 13}, 12654.85`}, {{2007, 2, 14},
12741.86`}, {{2007, 2, 15}, 12765.01`}, {{2007, 2, 16},
12767.57`}};
(*Create_Array_With_sequential_number*)
Tech1 = Table[i, {i, Dimensions[data22][[1]]}];
data22 = MapThread[Insert, {data22, Tech1, Table[3, {Length[Tech1]}]}];
data33 = data22[[All, {3, 2}]];
nlm = NonlinearModelFit[data33, a + b*(t)^0.3, {a, b}, t];
p1 = Plot[nlm[t], {t, 1, Dimensions[data33][[1]]},
PlotStyle -> {Black}];
Show[ListPlot[data33], p1]
That’s works well, but it plots a numbers on the X-axis ( 1,2,3,4… ).
How can I plot the same graphic, but with dates on the X-axis ( {2007, 1, 16}, {2007, 1, 17}, {2007, 1, 18},… ) ?
I found function DateListPlot, but I don’t know, how to use it in this case.
Many thanks !