The semantics of your commands is that x'(t)=s*(y(t)-x(t)), y'(t)=-x(t)*z(t)+r*x(t)-y(t), and z'(t)=x(t)*y(t)-b*z(t), with the constants you have given for s, r, and b. MATLAB will follow the commands you have given and compute a numerical approximation to this system. I am not entirely sure what you mean by your question,
How does ode45 know to take the functions, […] and approximate them?
That is exactly what you told it to do, and it is the only thing ode45
ever does. (By the time you call ode45
, the names x, y, z are completely irrelevant, by the way. The function only cares for a vector of values.) If you are asking about the algorithm behind approximating the solution of an ODE given this way, you can easily find any number of books and lectures on the topic using google or any other search engine.
You may be interested in the function odeToVectorfield
, by the way, which simplifies getting these functions from a differential equation written in more traditional form.