MATLAB Answers

non linear curve fitting for scatter points

2 views (last 30 days)
fereshte
fereshte on 8 Jul 2014
Commented: fereshte on 9 Jul 2014
hi...i have some scatter points in x-y coordinate.how can do curve fitting for them? please help me.its very necessary for me.

  0 Comments

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 8 Jul 2014
When you say "non-linear" do you really mean nonlinear in x? Or do you mean just a regular polynomial, which can be, say a cubic, which can be solved with regular linear least squares like polyfit() gives you? You can have a fit that's not a straight line and it's still linear least squares because it's linear in the coefficients, not the x terms. I attach a demo for you that uses polyfit().

  3 Comments

fereshte
fereshte on 8 Jul 2014
i want get best curve fitting for my points like attached file then get coefficients form this curve.i think gussian is very good for this.in attached file blue points are my points and red curve is fitted curve.
Image Analyst
Image Analyst on 9 Jul 2014
I'm not familiar with finding mixtures of Gaussians. See Wikipedia article http://en.wikipedia.org/wiki/Mixture_density to get started.
fereshte
fereshte on 9 Jul 2014
thanks.dear Image Analyst how use cubic fit for my points?

Sign in to comment.

Sign in to answer this question.