Professional Documents
Culture Documents
[ipfs] = wavread('D:\a_wovel.wav');
max_expected_period = round(1/50*fs);
min_expected_period = round(1/200*fs);
frame_len = 2*max_expected_period;
[max_valmax_loc] = max(frame);
num_cycles_in_frame = ceil(frame_len/period);
test_start_positions = max_loc-(period*[-
num_cycles_in_frame:num_cycles_in_frame]);
index = find(test_start_positions> 0,1, 'last');
start_position = test_start_positions(index);
colours = 'rg';
subplot(3,1,2)
plot(frame);