to find zero crossing rate for a signal

7 ビュー (過去 30 日間)
Amit
Amit 2015 年 1 月 21 日
コメント済み: Ced 2015 年 1 月 21 日
hello, i have following data and i want to find ZERO CROSSING RATE for the following:
A=[34.157226 -35.159323 35.459952 -34.057017 -32.704186 -33.180182 -32.22819 -32.403557 -32.303347 -32.253243 -32.578924 -32.253243 -32.428609 -31.777247 -31.927561 -32.403557 -31.60188 32.12798 -31.952613 31.60188 -31.351355 -32.153033 31.201041 -30.324206 -30.975569 -30.975569 -30.900412 -31.877456 -31.226093 -32.22819 -32.353452 -32.378505 -32.203138 -32.102928 -32.729238 -33.606073 -32.654081 -33.68123 -34.307541 35.259533 35.284585 35.660372 35.635319 35.33469 6.186472 -36.912993 -38.115509 -38.566452 -38.566452 -38.741819 -39.593601 -40.971484 -41.422428 -42.825363 -42.825363 -42.624944 -43.351464 44.328508 44.278403 -44.278403 45.480919 46.232492 -46.883855 46.984064 -47.009117 -48.28679 ]
would anyone help me out???

採用された回答

Ced
Ced 2015 年 1 月 21 日
Sure... it's 0, because your signal is always negative.
  2 件のコメント
Amit
Amit 2015 年 1 月 21 日
but let me change the question sorry.please see it now.
Ced
Ced 2015 年 1 月 21 日
Do you know the formula for the zero crossing rate?
Try to fill in this function:
function rate = zero_crossing_rate(signal)
signal = signal(:);
T = length(signal);
% % Enter the function from wikipedia here
rate = ...
end
Hints: The simplest way would be to create a for loop and check the (s_t*s_{t-1}<0) property.

サインインしてコメントする。

その他の回答 (0 件)

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by