Zero-crossing calculation
古いコメントを表示
Hi all, I need a script which can calculate zero crossing of the signal. I have the value of x and y. The script should be able to calculate the exact position of zero crossing points. Help!
採用された回答
その他の回答 (1 件)
MSP
2017 年 8 月 12 日
zeroindex=find(y==0)
x(zeroindex)
3 件のコメント
Jayanta Deb
2017 年 8 月 12 日
Shubhashree Bal
2019 年 7 月 2 日
It is not necessary that there is sample at amplitude equal to 0.
Example:
x = [ 1 2 3 4 5];
y = [1 -1 -2 -3 -4];
k= find (y==0);
Conclusion: Instead of having zero crossing it will not return any index. Thus, we can check sign change for finding zero crossing accurately.
Thanks!
GIULIA CISOTTO
2020 年 11 月 3 日
Dear Shubhashree, this is not actually true: zero-crossing is defined as the number of times a signal changes its sign. If you apply your computation, then you might have an incorrect number of ZC. Let's consider a signal with a number of consecutive samples set to zero: then, you will add all of them to the ZC counter. However, you would be wrong in that. Please, check my answer above for the correct computation of ZC.
カテゴリ
ヘルプ センター および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!