I would model the differential equation in Simulink. Integrator blocks will you enter initial values for x(0) and xdot(0). Solve your equation for the second derivative of x, calculate that in Simulink using blocks, and then integrate that twice to get x(t). You must feed x, xdot,...
Converting your Simulink model iteratively using the Fixed-Point Tool Automatic conversion using fixed-point optimization Debug Numerical Differences Due to Quantization With MATLAB, you can identify, trace, and debug the sources of numerical issues due to quantization such as overflow, precision loss, ...
If this License fails to meet the government's needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to The MathWorks, Inc. Trademarks MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See ...