MATLAB: Extract and store valuable data in vectors

radar signalstore pulses in vector

I have a signal (vector) consists of many blocks (for example five blocks).I want to extract, separate, these blocks (that contain a valuable information ) from the main signal and store every block in a vector. This is real data and the 5 valuable information in the example are not always in same location.
For example like:
So if I have an input vector (V), The result , in our case, should be five mini vectors (v1, v2, v3, v4, v5).
I tried to apply this method: If a specific consecutive elements from (V) vector have a value above a threshold (for example 0.02 > Thr) start put the elements in a a mini vector, but it does not work because values in the input vector (V) are getting positive and negative.

Best Answer

Simple thresholding won't work because in each burst there are dips that you probably want to keep. Luckily for you I solved this same problem for another person in this discussion: http://www.mathworks.com/matlabcentral/answers/229678#answer_185935 :
% Setup - read in the signal and plot it.
s=load('signal.mat')
signal = s.coarse_d;
subplot(3,1,1);
plot(signal, '-', 'Color', [0,.5,0]);
grid on;
% MAIN CODE IS THE FOLLOWING TWO LINES OF CODE.
% Threshold the signal
lowSignal = abs(signal) < 0.1;
% Remove stretches less than 10,000 elements long.
% And invert it to get the high signal areas instead of the quiet areas.
lowSignal = ~bwareaopen(lowSignal, 10000);
% Now we're done. Plot the results.
subplot(3,1,2);
plot(lowSignal, 'b-', 'LineWidth', 2);
grid on;
% Plot both on the same graph now.
subplot(3,1,3);
plot(signal, '-', 'Color', [0,.5,0]);
hold on;
plot(lowSignal, 'b-', 'LineWidth', 2);
grid on;
As you can see it identifies each "block" but leaves the inside of the block intact.