Please copy the code
Write out the second-order differential equation in the figure in MATLAB, and solve the discrete solutions of x(t) and y(t) by fourth-order Runge-Kutta method. The discrete solution results are correct. However, according to the discrete solution by writing the Fourier transform program to find the power spectrum as shown on the left, it is still unable to draw the results in the right. And the drawn results have always been affected by the calculation time, but that's not in the reference. I would like to ask what kind of program should be written to get the power spectrum of the right picture.