This should have been covered in your signal processing course. First, take the fft of your input and output data, the divide the Fourier transform of your output data by the Fourier transform of your input data to get the complex frequency transfer function. Use the abs function to calculate the amplitude, and the angle function (consider unwrap as well) to get the phase. I will let you explore the code to define the frequency range, and calculating the amplitude in dB.
If you want a transfer function representation, your likely best option is to use the invfreqz function to create a transfer function, then the freqz function to create the Bode plot. If your transfer function is relatively smooth, this will be a good approximation.
The impulse response is the inverse Fourier transform of the complex transfer function.