← Lectures·L3

Signals: Time, Frequency, and the Digital World

Prof. Dr. Alessandro Del Vecchio · 7 concepts · 5 questions

Concept 1 / 7

Signals as Functions — 1D, 2D, and 3D Arrays

A signal is any quantity that depends on another variable — most often time: y(t). The dimensionality of a signal describes the number of independent variables it depends on.


DimensionalityDescriptionBiomedical exampleNumPy shape
1DDepends on time onlySingle EMG channel voltage(t), elbow angle θ(t)(T,)
2DDepends on two variables (space × space, or space × time snapshot)EMG electrode-grid frame at one instant; greyscale image(rows, cols)
3DDepends on three variablesMUAP propagation movie (rows × cols × time); fMRI volume(rows, cols, T)

In Python, a signal is an np.ndarray plus metadata: the sampling rate fs [Hz] and the physical unit (mV, deg, N). Without metadata, the array is just numbers — always document what the axes represent.


import numpy as np
fs = 2000          # 2000 samples per second
t = np.linspace(0, 1, fs)   # 1-second time axis, shape (2000,)
emg = np.random.randn(fs)   # placeholder 1D signal, shape (2000,)