Filter löschen
Filter löschen

how to make an envelope of a signal?

12 Ansichten (letzte 30 Tage)
Bart
Bart am 12 Mär. 2012
Kommentiert: Image Analyst am 26 Mär. 2018
He,
I have some trouble with making an envelope of a noisy signal with Matlab. Is there some function to do this?

Antworten (3)

Image Analyst
Image Analyst am 12 Mär. 2012
Try morphological dilation and erosion - they're the local max and min. Use imdilate and imerode if you have the image processing toolbox.
numberOfSamples = 200;
t = linspace(0, 4*pi, numberOfSamples);
decay = exp(-t);
y = 10 .* sin(t) .* exp(-t) + rand(1, numberOfSamples);
plot(t, y, 'r-');
grid on;
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
upperEnvelope = imdilate(y, true(1, 9));
lowerEnvelope = imerode(y, true(1, 9));
hold on;
plot(t, upperEnvelope, 'b-', 'LineWidth', 2);
plot(t, lowerEnvelope, 'b-', 'LineWidth', 2);

Andrei Bobrov
Andrei Bobrov am 12 Mär. 2012
Use rand, randn, etc.
eg
x = linspace(0,2*pi,300);
sx = sin(x);
out = sx + .2*(2*rand(size(x)) - 1);
plot(x,sx,'b.',x,out,'r*'); grid on
  2 Kommentare
sunil kalyankar
sunil kalyankar am 26 Mär. 2018
i have data in time domain envelope analysis pls help me in writing matlab code pls pls
Image Analyst
Image Analyst am 26 Mär. 2018
There are now boundary() and envelope() functions in MATLAB. Try them.

Melden Sie sich an, um zu kommentieren.


Daniel Shub
Daniel Shub am 12 Mär. 2012
You could use the Hilbert Transform.

Community Treasure Hunt

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

Start Hunting!

Translated by