Is there a way to mathematically separate curves by shape?
Show older comments
I have 1000 plots displaying the same type of data. Each plot has 4 curves.
2 of these curves are called the G lines and the other two are called the S lines.
"Proper" G lines are not supposed to cross, they are supposed to have a relatively flat linear portion and an exponentially increasing portion afterwards. Proper S lines are supposed to be flat and linear throughout.
However, among the original 1000 plots, some are "improper" (linear portion of G or S line has a negative slope, the two G lines cross, exponential portion of G lines are not "exponential" enough, etc.). There are eight different ways that a PLOT can be improper based on the shapes of the four curves.
The problem asks me to write an algorithm that analyzes these 1000 plots and first mathematically determines which plots are proper/improper and then separate the improper plots into the eight different improper forms.
MOST IMPORTANT: This needs to be done in such a way that I can be given any plot not in the original 1000 and be able to mathematically determine whether it is proper/improper and, if necessary, characterize it into one of the eight improper modes.
5 Comments
Ryan
on 3 Jul 2012
Do you have an example of a plot? If the G and S lines are different colors, then it may be possible to extract these lines and use the image processing toolbox (if you have it) to see if there are branch points and also calculate eccentricity, orientation or tortuosity to try to assess the shape of the lines.
Stephen
on 3 Jul 2012
Are we doing your homework for you? Whatever, if you want to get the data from the plots (I'm assuming you don't get vectors like G1 G2), you can use ch = get(gca,'children');, and then y = get(ch,'Ydata');. From the y information, you should be able to do whatever math you want to compare the values. You already described the differences you need to determine what a G or S line is and whether a plot is improper, so just implement it for any given input y.
Sy
on 3 Jul 2012
Sean de Wolski
on 3 Jul 2012
Well diff will be a useful one. It will tell you the numerical derivative of the data.
Answers (0)
Categories
Find more on Annotations 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!