forum.alglib.net http://forum.alglib.net/ |
|
Aproximation http://forum.alglib.net/viewtopic.php?f=2&t=104 |
Page 1 of 1 |
Author: | juanraulpj [ Thu Oct 28, 2010 10:27 am ] | ||
Post subject: | Aproximation | ||
I wrote some time ago for help on an approach but I have not got the results I expected. With the function you suggested me to use do not get a really good approximation. Before I try to implement the program with c# I did in MATLAB and approached the curve quite well. I send a picture with what I get with MATLAB and with your spline1dfitcubicwc function. The blue line are the points to align, the red line I get with MATLAB and green which I get from spline1dfitcubicwc function. Thanks in advance.
|
Author: | juanraulpj [ Thu Oct 28, 2010 10:29 am ] |
Post subject: | Re: Aproximation |
I forgot ... I do an analysis of the sections which I have and analyze each section separately |
Author: | Sergey.Bochkanov [ Thu Oct 28, 2010 11:54 am ] |
Post subject: | Re: Aproximation |
Can you describe your problem in more details: * do you have parametric problem (you try to fit x(t) and y(t) separately) or you try to fit Y as function of X? * how do you split your data into segments? |
Author: | juanraulpj [ Thu Oct 28, 2010 2:25 pm ] |
Post subject: | Re: Aproximation |
XY points are geographical coordinates (lat lon). This point define the trajectory of a mobile. Data analyzed are not very stable as you can see then what I have to do is bring that information to then represent them in google maps and you're in line (more or less) to the reality of the streets. So I want to approach and no interpolations. If you look at the red line I get with MATLAB is more or less the direction of the street but not exactly. |
Author: | juanraulpj [ Thu Oct 28, 2010 2:37 pm ] |
Post subject: | Re: Aproximation |
To split data into segments I had create a function who analyze the tendence of the curve and after, cut up the curve in segments |
Author: | Sergey.Bochkanov [ Thu Oct 28, 2010 4:18 pm ] |
Post subject: | Re: Aproximation |
Do you have time values assigned to points? I.e. not only x[] and y[], but array of t[] which contain time when points was sampled. With time, it could be much more easier... |
Author: | juanraulpj [ Tue Nov 02, 2010 9:04 am ] |
Post subject: | Re: Aproximation |
Yes... I have 4 data inputs. x[] y[] t[] w[], where w[] are the weights. |
Author: | Sergey.Bochkanov [ Tue Nov 02, 2010 9:39 am ] |
Post subject: | Re: Aproximation |
Maybe you should try parametric fitting? I.e. fit x(t) and y(t) separately, then plot resulting curve. You can use new penalized regression spline fitting functions (described at http://www.alglib.net/interpolation/lea ... #splinefit ). |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |