How to fitt 300 polynomes (2D or better 3D) over individual vector-tracks, to get the angels along the new fit!
Show older comments
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
John D'Errico
on 3 Feb 2011
Angels fit only on the heads of a pin.
Jan
on 3 Feb 2011
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.
Sean de Wolski
on 3 Feb 2011
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.
John D'Errico
on 3 Feb 2011
I'm still trying to figure out what the question is here though.
John D'Errico
on 3 Feb 2011
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?
Sean de Wolski
on 3 Feb 2011
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.
Philipp
on 4 Feb 2011
Sean de Wolski
on 4 Feb 2011
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.
Answers (1)
Philipp
on 3 Feb 2011
0 votes
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!