How to fit two equations to one dataset

I have one dataset and I plotted it in a graph, see the attached image. the plotted data has two distinct trends, I want to delete the lower one only keep the larger(middle) one. How can I do that?
Thanks in advance!

3 commentaires

Satyajeet Sasmal
Satyajeet Sasmal le 19 Nov 2015
Hi Yolanda,
You could just plot the Upper curve and not plot the lower curve when you plot your dataset. else, based on your requirement, you can sent conditions in your code to select only the points which are above a particular threshold(for example). Hope this answers your question.
Yolanda Gu
Yolanda Gu le 19 Nov 2015
Thanks Saryajeet, what if this plot is actually dynamic? for example in the plot above,-10 seems to be the threshold, but in other scenarios 0 might be the threshold. How can I easily determine where my threshold is?
John D'Errico
John D'Errico le 19 Nov 2015
But that depends on what you know about these curves! You know what separates them. I could come up with a scheme that separates these particular curves. But you might have a huge variety of curves that are not so easily separated. So we would need to know what you know about the curves to really help you.

Connectez-vous pour commenter.

Réponses (1)

Thorsten
Thorsten le 19 Nov 2015
data(data < -10) = [];

2 commentaires

Yolanda Gu
Yolanda Gu le 19 Nov 2015
Thanks Thorsten, is there an easy way to make that -10 a dynamic number based on the look of the curves? the curve shape will change when I type in different parameters. How can I easily determine what the threshold is? Thanks!
Yolanda Gu
Yolanda Gu le 19 Nov 2015
For example, when I type a different parameter, I got a graph like this, where now I only want to keep the lower curve,and the threhold seems to be around 78 now. The equation I have will always create two curves, one long and one short, I only want to keep the long one never the short.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by