Or transform your equation to string format and after this use, for example, "textscan" function to find positive and negative coefficients and separate it:
Matlab help document is a very handy tool that conveniently categorized. In addition, it is possible to use a keyword search for entering key words in the search bar.
If this method did not give results, or you need to solve a complex problem, which still has not been studied, it is possible to try to find a discussion on the any forum of a similar easier task. Solution of the problem you may not found, but it is several times helped me find references to Matlab functions, which I later used for the solution of my tasks.
Another way is to ask question in the forum, likely someone already faced similar tasks. Besides, it is always interesting to see how other professionals approached to the solution of the problem.