forum.alglib.net

ALGLIB forum
It is currently Fri Apr 19, 2024 11:45 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Aproximation
PostPosted: Thu Oct 28, 2010 10:27 am 
Offline

Joined: Mon Oct 04, 2010 9:50 am
Posts: 7
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.


Attachments:
untitled.jpg
untitled.jpg [ 70.64 KiB | Viewed 7233 times ]
Top
 Profile  
 
 Post subject: Re: Aproximation
PostPosted: Thu Oct 28, 2010 10:29 am 
Offline

Joined: Mon Oct 04, 2010 9:50 am
Posts: 7
I forgot ... I do an analysis of the sections which I have and analyze each section separately


Top
 Profile  
 
 Post subject: Re: Aproximation
PostPosted: Thu Oct 28, 2010 11:54 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 906
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?


Top
 Profile  
 
 Post subject: Re: Aproximation
PostPosted: Thu Oct 28, 2010 2:25 pm 
Offline

Joined: Mon Oct 04, 2010 9:50 am
Posts: 7
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.


Top
 Profile  
 
 Post subject: Re: Aproximation
PostPosted: Thu Oct 28, 2010 2:37 pm 
Offline

Joined: Mon Oct 04, 2010 9:50 am
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Aproximation
PostPosted: Thu Oct 28, 2010 4:18 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 906
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...


Top
 Profile  
 
 Post subject: Re: Aproximation
PostPosted: Tue Nov 02, 2010 9:04 am 
Offline

Joined: Mon Oct 04, 2010 9:50 am
Posts: 7
Yes... I have 4 data inputs. x[] y[] t[] w[], where w[] are the weights.


Top
 Profile  
 
 Post subject: Re: Aproximation
PostPosted: Tue Nov 02, 2010 9:39 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 906
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 ).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 74 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group