An array is created that represents the superposition of three separate RF carriers, each modulated at a different audio frequency. This is the kind of signal that could be expected at the output of the LNA, ie. the entire AM band passes through the RF front end. This signal is multiplied by a local oscillator, passed though an IF filter, and demodulated using a simple envelope detector (half-wave rectifier and single pole LPF). Some plots are created at the end to show the signal at various locations in the receiver.
This file could easily be edited to account for more, less, or different carrier frequencies, modulating signals, etc. The values used in the LO, IF filter, and demodulation sections could all be varied as well to see their effects.
Note: As the program is currently written, the 'Signal Processing Toolbox' and 'Control System Toolbox' are required because of the function calls to butter(), tf(), and c2d(). It is possible that this file could be modified to avoid using those three functions by determining the filter coefficients differently in MATLAB or calculating them using another program, lookup table, etc. and entering them manually.
Changed the summary to indicate that the program could be modified to run without the toolboxes.
Added the Control System Toolbox to the list of required products.
Just changed the summary to indicate that this submission is heavily commented.