Spectral analysis of systems using only real signals. From https://ecomaan.nl/c/real_spectrum_analyzer.c ./real_spectrum_analyzer System y[n] = x[n] time Impulse response: -2: 0.00 * -1: 0.00 * 0: 1.00 ************************* 1: 0.00 * 2: 0.00 * 3: 0.00 * 4: 0.00 * 5: 0.00 * 6: 0.00 * 7: 0.00 * 8: 0.00 * 9: 0.00 * 10: 0.00 * freq Amplitude spectrum: 0.00: 1.00 *************************************************** 0.03: 1.00 *************************************************** 0.07: 1.00 *************************************************** 0.10: 1.00 *************************************************** 0.14: 1.00 *************************************************** 0.17: 1.00 *************************************************** 0.21: 1.00 *************************************************** 0.24: 1.00 *************************************************** 0.28: 1.00 *************************************************** 0.31: 1.00 *************************************************** 0.34: 1.00 *************************************************** 0.38: 1.00 *************************************************** 0.41: 1.00 *************************************************** 0.45: 1.00 *************************************************** 0.48: 1.00 *************************************************** 0.52: 1.00 *************************************************** 0.55: 1.00 *************************************************** 0.59: 1.00 *************************************************** 0.62: 1.00 *************************************************** 0.66: 1.00 *************************************************** 0.69: 1.00 *************************************************** 0.72: 1.00 *************************************************** 0.76: 1.00 *************************************************** 0.79: 1.00 *************************************************** 0.83: 1.00 *************************************************** 0.86: 1.00 *************************************************** 0.90: 1.00 *************************************************** 0.93: 1.00 *************************************************** 0.97: 1.00 *************************************************** 1.00: 1.00 *************************************************** ./real_spectrum_analyzer System y[n] = 0.6 x[n] - 0.4 x[n-1] time Impulse response: -2: 0.00 * -1: 0.00 * 0: 0.60 **************** 1:-0.40 *********** 2: 0.00 * 3: 0.00 * 4: 0.00 * 5: 0.00 * 6: 0.00 * 7: 0.00 * 8: 0.00 * 9: 0.00 * 10: 0.00 * freq Amplitude spectrum: 0.00: 0.20 *********** 0.03: 0.21 *********** 0.07: 0.23 ************ 0.10: 0.26 ************* 0.14: 0.29 *************** 0.17: 0.33 ***************** 0.21: 0.37 ******************* 0.24: 0.41 ********************* 0.28: 0.46 *********************** 0.31: 0.50 ************************** 0.34: 0.54 **************************** 0.38: 0.58 ****************************** 0.41: 0.63 ******************************** 0.45: 0.67 ********************************** 0.48: 0.70 ************************************ 0.52: 0.74 ************************************* 0.55: 0.77 *************************************** 0.59: 0.80 ***************************************** 0.62: 0.83 ****************************************** 0.66: 0.86 ******************************************** 0.69: 0.89 ********************************************* 0.72: 0.91 ********************************************** 0.76: 0.93 *********************************************** 0.79: 0.95 ************************************************ 0.83: 0.97 ************************************************* 0.86: 0.98 ************************************************* 0.90: 0.99 ************************************************** 0.93: 0.99 ************************************************** 0.97: 1.00 ************************************************** 1.00: 1.00 *************************************************** Happy hacking!