A general solution of the "inverse-system realization" problem for linear dynamical systems with waveform-structured inputs