I'm trying to get a nonlinear fit of a vector in Matlab with no success.
Let's assume that I have a vector called data:
data = [1,30,250,55,22,76]
which can be seen as a function like
and so on.
I want to make a nonlinear regression of this function/array with Matlab but the documentation is not helping me as it says something about
Matrix and I don't know how to get there starting from my simple array.
So the question is:
how can I make a nonlinear regression, in Matlab, starting from a given vector that can be seen as a function?
EDIT: As an extra, is it possible to have an array containing all the residuals in this form?
residuals=residual of data
EDIT 2: The output should be a function like this WolframAlpha result