positive zero crossing of a speech signal
3 ビュー (過去 30 日間)
古いコメントを表示
hello. I want to find locations of positive zero crossing of a speech signal . for example how in this picture how can I locate the places that signal is zero and before that was negative? 

0 件のコメント
回答 (1 件)
Star Strider
2020 年 8 月 4 日
Try this:
t = linspace(0, 1, 150); % Create Data
s = sin(2*pi*t*5); % Create Data
zci = @(y) find(diff(sign(y))); % Find Approximate Zero Crossing Indices
szx = zci(s); % Approximate Zero Crossing Indices
for k = 1:numel(szx)
idx = szx(k) + [0 1];
tzx(k) = interp1(s(idx), t(idx),0); % Interpolate To More Precise Zero-Crossings
dsdt(k) = diff(s(idx))./diff(t(idx)); % Derivative
end
figure
plot(t, s)
hold on
pzx = tzx(dsdt>0); % Derivative Greater Than 0
plot(pzx, zeros(size(pzx)),'^r')
hold off
grid
legend('Signal', 'Positive Zero Crossings')
Use your own time vector for ‘t’ and signal vector for ‘s’.
.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!