Coding and HDL
Octave and Python (SciPy)
Numeric questions on signals, filters and control, in Octave or Python with SciPy.
Some electronics questions ask you to compute a number, such as the gain of a filter at a frequency. You can answer them in Octave or in Python (SciPy), when the question offers both.
Octave
- The
signalandcontrolpackages are installed. Load them yourself: putpkg load signal(orpkg load control) at the top of your file. - Your file is
main.m. - Read input from standard input, for example
v = fscanf(stdin, '%f');. - Print results with
printfordisp.
Python (SciPy)
- Python with NumPy, SciPy and python-control.
matplotlibis installed, but plots are not shown to you.- Read input from
input()orsys.stdin, and print results.
Both
- Print exactly what the question asks for, such as a number with four decimals.
- Output is compared with a tolerance, so a result within the stated percentage passes.
- No other libraries are available, and you can't install packages.
- The first run can be a little slower while the libraries load.