I had a code like this:
signal = p4;
t2 = 1:1:length(p4);
peakValue = max(signal);
index1 = find(signal > (peakValue - 0.001), 1, 'first');
index2 = find(signal > (peakValue - 0.001), 1, 'last');
signal(index1:index2) = 2 * peakValue - signal(index1:index2);
signal(index1:index2) = signal(index1:index2);
but it not working anymore..