Is there a way to mathematically separate curves by shape?

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

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.
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.
Thanks for the quick response, Ryan. Here's an example plot. http://img850.imageshack.us/img850/5751/matlabb.png
The solid lines are the G lines and the dash-dotted lines are the S lines.
Sy
Sy on 3 Jul 2012
Edited: Sy on 3 Jul 2012
Thanks for the response, Stephen. I made the plots myself using x and y data. What I want to do is figure out how to write an algorithm that can separate the plots into proper/improper and then put the improper ones into one of the improper categories. This needs to be done in such a way that I can take ANY plot of similar data (not in the original 1000), feed it into the algorithm and MATLAB will spit out whether it is proper/improper and which improper type it is.
I'm not asking you to do it for me. That's why I didn't include any of the numbers or code. I'm just asking for someone to lead me in the right direction or direct me to a useful function as you have done.
Well diff will be a useful one. It will tell you the numerical derivative of the data.

Sign in to comment.

Answers (0)

Asked:

Sy
on 3 Jul 2012

Community Treasure Hunt

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

Start Hunting!