Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips

Ads

See Also

Embedded SystemsFPGA

DSP Code Sharing - Code Snippets - Code Examples

Rick Lyons
Richard (Rick) Lyons is a consulting Systems Engineer and lecturer with Besser Associates in Mountain View, California. He is the author of "Understanding Digital Signal Processing 2/E" (Prentice-Hall, 2004), and Editor of, and contributor to, "Streamlining Digital Signal Processing, A Tricks of the Trade Guidebook" (IEEE Press/Wiley, 2007). He is also an Associate Editor for the IEEE Signal Processing Magazine.

Contact Rick Lyons


NEW: Suggest a Snippet

Computing Optimum Two-Stage Decimation Factors [Matlab]

Consider the decimation system in Figure 1(a). When the desired decimation factor D_total is large, say D_total > 20, very significant lowpass filter (LPF) computational savings may be had by imp...

posted by Rick Lyons on Nov 21 2011
Comments (0) |

Computing Acceptable Bandpass Sample Rates [Matlab]

If you need to perform analog-to-digital conversion of the analog bandpass signal whose spectrum is shown in Figure 1(a), your fs bandpass sampling rate must be within one of three frequency ranges....

posted by Rick Lyons on Nov 25 2011
Comments (0) |

Computing FFT Twiddle Factors [Matlab]

This text, figures, and code snippet are also available in downloadable PDF format Typical applications of an N-point radix-2 FFT accept N x(n) input time samples and compute N X(m) frequency-domai...

posted by Rick Lyons on Nov 28 2011
Comments (1) |

Flat-Top Windowing Function for the Accurate Measurement of a Sinusoid's Peak Amplitude Based on FFT Data [Matlab]

The following Matlab code provides an accurate method of estimating time-domain sinewave peak amplitudes based on the fast Fourier transform (FFT) data. Such an operation sounds simple, but the scallo...

posted by Rick Lyons on Dec 14 2011
Comments (0) |

Testing the Flat-Top Windowing Function [Matlab]

The following code is for testing the Flat-Top Windowing Function, used for the Accurate Measurement of a Sinusoid's Peak Amplitude Based on FFT Data...

posted by Rick Lyons on Dec 14 2011
Comments (0) |

Adding a Controlled Amount of Noise to a Noise-Free Signal [Matlab]

The following gives two snippets of Matlab code. The first snippet is a function whose inputs are: (1) a real-valued signal, and (2) a desired signal-to-noise ratio (SNR) measured in dB. That 'SNR_Set...

posted by Rick Lyons on Jan 3 2012
Comments (3) |

Computing CIC Filter Register Pruning Using Matlab [Matlab]

The following Matlab code computes the amount register bit-pruning described in Eugene's Hogenauer's famous paper on cascaded integrator-comb (CIC) decimation filters [1]. Although there are many de...

posted by Rick Lyons on Feb 15 2012
Comments (3) |

Computing the Nth Roots of a Number [Matlab]

In Matlab when we want to compute the square root of a number we use the 'sqrt()' command. For example, if z = 9 we find the square root of z by typing the        ...

posted by Rick Lyons on Jan 9 2013
Comments (0) |

Beat Notes [Matlab]

The following Matlab code enables you to generate, and listen to, the sum of two audio tones.  Read this blog post for more details. ...

posted by Rick Lyons on Mar 13 2013
Comments (0) |