Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Chapters

Chapter Contents:

Search Introduction to Digital Filters

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Matlab Analysis of the Simplest Lowpass Filter

The example filter implementation listed in Fig.1.3 was written in the C programming language so that all computational details would be fully specified. However, C is a relatively low-level language for signal-processing software. Higher level languages such as matlab make it possible to write powerful programs much faster and more reliably. Even in embedded applications, for which assembly language is typically required, it is usually best to develop and debug the system in matlab beforehand.

The Matlab (R) product by The Mathworks, Inc., is far and away the richest implementation of the matlab language. However, it is very expensive for non-students, so you may at some point want to consider the free, open-source alternative called Octave. All examples in this chapter will work in either Matlab or Octave,3.1except that some plot-related commands may need to be modified. The term matlab (not capitalized) will refer henceforth to either Matlab or Octave, or any other compatible implementation of the matlab language.3.2

This chapter provides four matlab programming examples to complement the mathematical analysis of §1.3:

2.1:
Filter implementation
2.2:
Simulated sine-wave analysis
2.3:
Simulated complex sine-wave analysis
2.4:
Practical frequency-response analysis
In all four examples, the simplest lowpass filter, $ y(n) = x(n) + x(n - 1)$, is used as the specific filter for implementation or analysis, and the results obtained by simulations are compared to those obtained from theory in §1.3.

Note: The reader is expected to know (at least some) matlab before proceeding. See, for example, the Matlab Getting Started documentation, or just forge ahead and use the examples below to start learning matlab. (It is very readable, as computer languages go.) To skip over the matlab examples for now, proceed to Chapter 3.



Subsections

Order a Hardcopy of Introduction to Digital Filters

Previous: Elementary Filter Theory Problems
Next: Matlab Filter Implementation

written by Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See http://ccrma.stanford.edu/~jos/ for details.


Comments


No comments yet for this page


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )