Source: https://web.stanford.edu/~boyd/ee102/conv_demo.pdf