How to fitt 300 polynomes (2D or better 3D) over individual vector-tracks, to get the angels along the new fit!

I got 3D(fiber)-tracks/patterns, which consists of vectors (x,y,z). The tracks differ in the amount of vectors, some got 7 vectors and some 13. The cell-array consists of 200-350 individual tracks (cellarray f.e.: fiber {1:350,1}(x,y,z;1:13)).
The vectors are handrecorded and thats the reason, why the are scattered.
The question is, how can ja fit a "polynome" (2. degr.) over the fibertracks?
Why?
I want to know the angels of the new polynome over his whole course (at least angles in two levels (x-z ans y-z).
I started, to get an idea, with the cftool. 1. problem: i just can fit 1 track, but i got 300 of them. 2. the tracks sometimes have two y-values by 1 x-value f.e.: x = [1;1.2;1.4;1.6;1.7;1.8;1.7;1.6;1.5;1.2;1] y = [1;2;3;4;5;6;7;8;9;10;11]
but anyway, i can use it just für 2D fitting.
I am a matlab beginner and i am not an engineer, so please be patient with me. ;-)

8 Comments

I don't know what a "fiber-track" is, but it does not matter at all, because you process just values. It would be easier to understand the quetsion, if you omit such unnecessary details.
I, and Matlab, do not understand "fiber {1:350,1}(x,y,z;1:13)". Please explain the data with valid Matlab syntax.
I would listen and trust everything John D'Errico has to say when it comes to curve fitting. Perhaps search the FEX and the Newsreader for related threads.
I'm still trying to figure out what the question is here though.
In the example:
x = [1;1.2;1.4;1.6;1.7;1.8;1.7;1.6;1.5;1.2;1];
y = [1;2;3;4;5;6;7;8;9;10;11];
Are you trying to find a single quadratic polynomial that models this? Or are you trying to find 2 (or more, perhaps 5) line segments that model it?
Depending on the type of fiber it is, it could follow a completely random path or have a fixed shape. The fibers we work with have an _exact_ shape to our resolution.
For the former it seems a whole bunch of segments would make the most sense.
Are you trying to find a single quadratic polynomial that models this?
No. They don't follow a quadratic shape so that would provide meaningless results. Besides, we know the location of everything in the fiber (not hand recorded), so what does fitting anything to it buy us; we already know the information!
If your vectors are noisy, smooth them with some type of filter rather than fitting them with something meaningless.

Sign in to comment.

Answers (1)

The tracks usually have a quite simmilar shape. So every fiber/track could fit with a Polynome 2degr.
"Are you trying to find a single quadratic polynomial that models this? "
Not just für this (this means 2D polynomial..)! I try to find a single quadratic polynomial function for the whole track which is in 3D.
The example was just to show how i get two y-values by one x-values (maybe you got it anyway without my simple example..redundant). This is where i got the first problems. To find a adqeuate quadratic polynomial funtion to model/fit that. The second problem ist, that is not just a 2D, its 3D.
In my naive standing, i thought at first step i can fit this quadratic funktion in the x-z-plane an as the sec. step accordingly "tilt" it in the y-z-plane.
If this would work, i'll get the third problem. This function describes with its coefficents just one (the "root" fiber-track) ans wont fit to the other fibers (direction, position, bending..). So i guess it would the best to generate for each track an individual quadratic polynom automaticaly.
Is that helping you to understand what i am looking for?
I am open for every solution which let me get the angels over the fiber-tracks.

Categories

Asked:

on 3 Feb 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!