we need codes for erosion and dilation in signal processing...as imdilate and imerode functions can only be used in image processing..
They can be used for 1D signals, if you have the Image Processing Toolbox. Do you have that toolbox? If not, you might play around with this approach:
windowSize = 3; originalSignal = rand(10,1) hank = hankel(originalSignal) h3 = hank(:,1:windowSize) dilatedSignal = max(h3, , 2)
Yes, it is doable. It is better to binarize the signal first, and then use the command like
%the length 120 depends on how big the gap you want to close/seal.
%the degree 90 or 0 depends on your 1D signal is in vector or row format;