Exercises

ex-sp-ch18-01

Easy

Create a figure with text.usetex=True that displays the Shannon capacity formula C=Blog2(1+SNR)C = B\log_2(1 + \text{SNR}) as the y-axis label.

ex-sp-ch18-02

Easy

Use pandas.to_latex() to convert a DataFrame of BER results (3 modulations, 5 SNR values) into a LaTeX table with float_format='%.2e'.

ex-sp-ch18-03

Easy

Format the same data as a booktabs table using the tabulate library.

ex-sp-ch18-04

Easy

Write a function that takes a DataFrame and output path, and saves a LaTeX table with proper escaping and caption.

ex-sp-ch18-05

Easy

Create a figure using the PGF backend and verify it can be included in a LaTeX document with \input{figure.pgf}.

ex-sp-ch18-06

Medium

Build a complete figure generation script for a paper with 4 figures: (1) BER curves, (2) constellation diagram, (3) throughput CDF, (4) parameter comparison bar chart. All should use IEEE formatting.

ex-sp-ch18-07

Medium

Write a script that reads simulation results from multiple CSV files, generates a summary table with mean BER and confidence intervals, and saves it as a LaTeX table.

ex-sp-ch18-08

Medium

Create a figure that uses siunitx for axis labels: frequency in GHz, power in dBm, time in microseconds.

ex-sp-ch18-09

Medium

Use Pandas Styler to create a LaTeX table where the best BER in each column is highlighted in bold.

ex-sp-ch18-10

Medium

Write a Makefile that orchestrates: simulate.py -> results.csv -> plot_figures.py -> figures/*.pdf -> paper.tex -> paper.pdf.

ex-sp-ch18-11

Hard

Build a Jinja2 template system that generates a complete LaTeX results section from simulation data, including figures, tables, and inline numbers like "BPSK achieves BER = 1.2e-5 at 10 dB."

ex-sp-ch18-12

Hard

Create a figure generation class that reads a YAML configuration file specifying figure contents, styles, and layout, then produces all figures automatically.

ex-sp-ch18-13

Hard

Implement automatic figure captioning: the script reads simulation parameters and generates descriptive captions like "BER vs Eb/N0 for BPSK, QPSK, and 16-QAM over Rayleigh fading (N=100000 bits)."

ex-sp-ch18-14

Challenge

Build a complete reproducible paper template: simulation code, figure scripts, table scripts, Makefile, and a LaTeX document that compiles into a 4-page IEEE conference paper with 6 figures and 2 tables — all regenerated from make.

ex-sp-ch18-15

Challenge

Create a CI/CD pipeline (GitHub Actions) that runs your simulation, generates figures and tables, compiles the paper, and publishes the PDF as a release artifact.