How to discretize a differential equation in Matlab?

To discretize a differential equation in Matlab, you can use the ode45 function. This function takes a differential equation and converts it into a set of discrete equations that can be solved using numerical methods. You can also use the ode23 and ode113 functions for more complex equations.