Examples

Keywords: examples

All examples are built as stand-alone programs not build by the target all by default. You may build all of the example binaries at one time by running

$ make examples

from the top-level directory. Sometimes, however, it is useful to build one example individually. This can be accomplished by directly targeting its binary. The example then can be run at the command line. For example to build and run just the modem example, run

$ make examples/modem_example
$ ./examples/modem_example
linear modem:
    scheme:         qam16
    bits/symbol:    4
   0 :  -0.94868326 + j* -0.94868326
   1 :  -0.94868326 + j* -0.31622776
   2 :  -0.94868326 + j*  0.94868326
   3 :  -0.94868326 + j*  0.31622776
   4 :  -0.31622776 + j* -0.94868326
   5 :  -0.31622776 + j* -0.31622776
   6 :  -0.31622776 + j*  0.94868326
   7 :  -0.31622776 + j*  0.31622776
   8 :   0.94868326 + j* -0.94868326
   9 :   0.94868326 + j* -0.31622776
  10 :   0.94868326 + j*  0.94868326
  11 :   0.94868326 + j*  0.31622776
  12 :   0.31622776 + j* -0.94868326
  13 :   0.31622776 + j* -0.31622776
  14 :   0.31622776 + j*  0.94868326
  15 :   0.31622776 + j*  0.31622776
num sym errors:    0 /   16
num bit errors:    0 /   64
results written to modem_example.m.

The examples are probably the best way to understand how each signal processing element works. Each example targets a specific functionality of liquid , such as FIR filtering, forward error correction, digital demodulation, etc.

Octave

A number of the example programs when run will generate an output .m file which can be run directly in Octave . This is particularly useful for visualizing filtering operations. For example, running modem_example.m from the above should produce a figure similar to the following:

doc/examples/examples_modem_qam16.jpg

Most of the examples have a brief description at the top of the file; these descriptions are listed below (and are also available in the examples/README.md file) for convenience. Some of the examples are experimental and will not be built by default; see the experimiental section for details.