1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| for i=10:N-1
z=Wr(:,i);
d=diff(sign(diff(z)));
j=find(d==-2)+1;
%[val,posit]=max(z(j));
% plot(z)
%hold on
%plot(j,z(j),'r*')
% for o=1:length(z(j))
% M(o)=z(j(o));
% end
%m=z(j)
for u=1:3
[val,posit]=max(z(j))
posipeak(u)=j(posit);
z(j(posit))=0;
end
finalposipeak(1,i)=min(posipeak);
finalposipeak(2,i)=max(posipeak);
end
%axes(handles.PlotIF);
%finalposipeak=finalposipeak+ones(2,63);
for i=1:N-1;
%i
%%plot(absc,abs(Wr(i,:))+20*(i/164));
%%celle la
axes(handles.PlotIF);
plot(freqc,(abs(Wr(:,i))+6*(i/taille_temps)));
hold on
if finalposipeak(1,i)~=0;
plot(freqc(finalposipeak(1,i)),(abs(Wr(finalposipeak(1,i),i))+6*(i/taille_temps)),'r*');
end
if finalposipeak(2,i)~=0;
%plot(freqc(finalposipeak(1,i)),(abs(Wr(finalposipeak(1,i),i))+6*(i/taille_temps)),'r*');
hold on
plot(freqc(finalposipeak(2,i)),(abs(Wr(finalposipeak(1,i),i))+6*(i/taille_temps)),'g*');
end
hold on
end |
Partager