No BSD License  

Highlights from
Level Crossing Rate

4.6

4.6 | 5 ratings Rate this file 11 Downloads (last 30 days) File Size: 1.07 KB File ID: #2817

Level Crossing Rate

by Adrian Bohdanowicz

 

05 Dec 2002 (Updated 09 Dec 2002)

The function calculates Level Crossing Rate (LCR).

| Watch this File

File Information
Description

LCR calculates Level Crossing Rate, that is a number of crossings (in the positive direction) of an input vector through a given threshold vector.
[x,t] = lcr( sig, thr );

The crossings are calculated for all the values of the input threshold vector. The input signal has to be a vector.

Example:
n = randn( 1, 1000 );
x = lcr( n, -5:0.1:5 );
plot( t, x );

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
26 Jun 2005 Shan BK

Good work.

13 Oct 2006 H. S. Kim

good to see this

17 Oct 2006 X. Y. Zheng

So powerful! Really a nice work.

Please use the following number calculator to save more than 10% CPU time when you have a very long vector:

lcf( i ) = length(find(tmp==1));

Thanks again! I happened to find your code, but it will help my research from now on.

24 Feb 2007 Nadaraja Pillai

Hi its nice to calculate the crossing rate...

28 Nov 2007 Aydar Zimaliev

Nice and simple! Thank you

18 Apr 2009 Guan Wang

thank you!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
dsp Adrian Bohdanowicz 22 Oct 2008 06:54:39
level crossing rate Adrian Bohdanowicz 22 Oct 2008 06:54:39
lcr Adrian Bohdanowicz 22 Oct 2008 06:54:39
crossings Adrian Bohdanowicz 22 Oct 2008 06:54:39
signal Adrian Bohdanowicz 22 Oct 2008 06:54:39
threshold vector Adrian Bohdanowicz 22 Oct 2008 06:54:39
lcr Pedro 25 May 2010 20:53:37
level crossing rate yao 16 Aug 2011 05:17:24

Contact us at files@mathworks.com