Hello guys,

I am a developer from Russia trying very hard to learn how libgretl works. I successfully understood the provided code example (extra/simple_client.c). Unfortunately, LSQ is not enough and I want to use NLS. Could you please post a code example for, I say,

y=a x^2 + b x + c

model,

x = 1, 2, 3, 4, 5, 6
y = 3, 7, 13, 21, 31, 43

data series. Particularly, how to get the values of a, b and c?

I've read http://gretl.sourceforge.net/API/gretl-Nonlinear-models.html but it does not clarify how to write the actual code. I mean, it seems that I should use nlspec_new(), nlspec_set_regression_function() and model_from_nlspec() and I am not sure how to connect them.

Thanks,
Markovtsev Vadim.