A = xlsread('z_data.xlsx');z1 = A(:,1);z2 = A(:,2);%% finding beginning of pulse and peak
z11 = z1;z21 = smooth(z2,10); z3 = diff(z2);z4 = diff(z1);z5 = (diff(z21)./diff(z11)) > 0;z6 = diff(z5);z7 = logical(diff(z5));z8 = diff(z5) < 0 ;z9 = logical(diff(z8));%% plots
figuresubplot(6,1,1);plot(z11,z21);hold onplot(z11(z7),z21(z7),'.g','markersize',20);hold offsubplot(6,1,2);plot(z5);subplot(6,1,3);plot(z6);subplot(6,1,4);plot(z7);subplot(6,1,5);plot(z8);subplot(6,1,6);plot(z9);
I have made use the derivative and logical operations one after the other and hence found out the start point and peak of the pulse.
There after not able to find half maximums of each pulse, and the point where the pulses end.
Also i do not have a formula through which the area of such varing waveform could be found out.
Best Answer