function out = synth_impulse(ms, fs) %SYNTH_IMPULSE generate impulse % out = synth_impulse(ms, fs) generate a vector having one impulse at % the beginning. % % ms - length of signal in milli-seconds % fs - sampling frequency in Hz % % 2004-11-05 by MARUI Atsushi N = ceil(ms / 1000 * fs); out = [1 zeros(1, N-1)];