diff extra codes/plot_peaks.m @ 3:1c0f36c348d4

extra code for matlab
author Katerina <katkost@gmail.com>
date Sat, 20 Apr 2013 13:03:01 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extra codes/plot_peaks.m	Sat Apr 20 13:03:01 2013 +0100
@@ -0,0 +1,14 @@
+function plot_peaks(Xmag,Xphase,ploc,t)
+figure(1);
+subplot(2,1,1)
+plot(Xmag);
+hold on;
+plot(ploc,Xmag(ploc),'r*');
+plot([1,length(Xmag)],[t,t],'g');
+hold off;
+subplot(2,1,2);
+plot(Xphase);
+hold on;
+plot(ploc,Xphase(ploc),'r*');
+hold off;
+pause;
\ No newline at end of file