Plot envelope of a grassy plot
Afficher commentaires plus anciens
Hi all, I have a graph which looks very grassy. What I want is the following (see picture). I have a grassy graphy (blue line), but I want the envelope which clearly shows the peaks of the graph (red line - this line is drawn in paint). A group of peaks may added to 1 group of peak. I have tried the following in matlab, without success: - smooth; - basic tool of curve fitting; - Hilbert transform; - polyfit; - Toolbox Ezyfit; butterworth function.
The problem is that I either get too many peaks, or the envelope does not really fit.

Any suggestions how to deal with this? Thanks in advance!
Réponses (3)
Chad Greene
le 11 Juin 2016
0 votes
Do you have the Signal Processing toolbox? If so, the envelope function makes is pretty easy to use.
1 commentaire
André
le 11 Juin 2016
Image Analyst
le 11 Juin 2016
0 votes
Another option is sgolayfilt(). They all give different looks and it just depends on what "look" you're looking for.
Image Analyst
le 11 Juin 2016
0 votes
Maybe you can use findpeaks(). There are lots of options for specifying which peaks you want to detect and which you want to ignore. Then, once you've found the peaks, use linspace() to draw lines in between the peaks to fill out the array so that you have a value at every index.
6 commentaires
André
le 12 Juin 2016
Image Analyst
le 12 Juin 2016
Modifié(e) : Image Analyst
le 13 Juin 2016
We can't really help you unless you supply your X and x and y values and code.
André
le 13 Juin 2016
Image Analyst
le 13 Juin 2016
Please supply the code you used that generated the error and I'll try it tomorrow.
André
le 13 Juin 2016
André
le 14 Juin 2016
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!