1% Copyright David Rowe 2009 2% This program is distributed under the terms of the GNU General Public License 3% Version 2 4% 5% plpitch.m 6% Plots two pitch tracks on top of each other, used for comparing pitch 7% estimators 8 9function plpitch(pitch1_name, pitch2_name, start_fr, end_fr) 10 11 pitch1 = load(pitch1_name); 12 pitch2 = load(pitch2_name); 13 14 st = 1; 15 en = length(pitch1); 16 if (nargin >= 3) 17 st = start_fr; 18 endif 19 if (nargin >= 4) 20 en = end_fr; 21 endif 22 23 figure(1); 24 clf; 25 l1 = strcat("r;",pitch1_name,";") 26 l1 27 st 28 en 29 plot(pitch1(st:en), l1); 30 axis([1 en-st 20 160]); 31 l2 = strcat("g;",pitch2_name,";"); 32 hold on; 33 plot(pitch2(st:en),l2); 34 hold off; 35endfunction 36 37