to find zero crossing rate for a signal
3 views (last 30 days)
Show older comments
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???
0 Comments
Accepted Answer
Ced
on 21 Jan 2015
Sure... it's 0, because your signal is always negative.
2 Comments
Ced
on 21 Jan 2015
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.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!