How to outline a curve

15 ビュー (過去 30 日間)
dj
dj 2014 年 10 月 12 日
コメント済み: dj 2014 年 10 月 13 日
Hello.
If I'm trying to plot variables x and y, and the y values vary so much that the curve looks like the following: http://i.stack.imgur.com/4uiNT.png
The only difference is that mine is a single curve of data with a lot of noise. Is there a way I could just plot the upper and the lower curves so I could just look at the boundaries? Do I have to use the findpeak command?
Thank you for your time!
  2 件のコメント
pietro
pietro 2014 年 10 月 12 日
How could you make that plot from the boundary array?
dj
dj 2014 年 10 月 13 日
It's just an image that looks like my plot. I just have a really noisy data ):

サインインしてコメントする。

採用された回答

Mohammad Abouali
Mohammad Abouali 2014 年 10 月 12 日
編集済み: Mohammad Abouali 2014 年 10 月 12 日
  3 件のコメント
Mohammad Abouali
Mohammad Abouali 2014 年 10 月 12 日
編集済み: Mohammad Abouali 2014 年 10 月 12 日
There is no two sets of data. In this graph there is only 1 set, i.e. the blue line. Once you run the HANTS algorithm you have three options, Lo (which gives you the red line) Hi (which gives you the black line), or none which gives you the green line.
You might need to play a bit with the sampling and frequency numbers to get a proper fit.
This function is generally for smoothing the data set and also removing outliers. Of course it gives the main frequency in your data set and you can use it for harmonic analysis.
dj
dj 2014 年 10 月 12 日
I'll look more into this and see if I can figure it out. Thank you for your help!

サインインしてコメントする。

その他の回答 (1 件)

John D'Errico
John D'Errico 2014 年 10 月 12 日
I suppose you could use my SLM tools . It has an option to fit an envelope curve, so you could first fit the infimum curve, then the supremum curve to get lower and upper bounds from a pair of calls.
You might want other options in the total prescription, but a start might be...
LBcurve = slmengine(x,y,'envelope','inf');
UBcurve = slmengine(x,y,'envelope','sup');
  1 件のコメント
dj
dj 2014 年 10 月 12 日
編集済み: dj 2014 年 10 月 12 日
Hi, thank you for the feedback!
I've tried using your program on two different computers, and it's giving me an error of the following:
Error using diag Out of memory. Type HELP MEMORY for your options.
Error in slmengine>slmengine_cubic (line 2316) rs = diag(1./sum(abs(Mineq),2));
Error in slmengine (line 255) slm = slmengine_cubic(x,yhat,prescriptionhat);
Could this be because the data is too large? It consists of over 550000 set of points... I'm really new to Matlab, so any help would be appreciated (:

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by