-1

I'm writing some MATLAB code that gives a symbolic equation. The equation has a number of fractional terms where the denominators are different functions. I would like to group the terms with the same denominator. To give an example of what I'm trying to achieve assume the following equation:

[1]

Where the x_i's are different functions in my case. Is there a function in MATLAB that can achieve this? or if you could write an algorithm that would be extremely helpful. [1]: https://i.stack.imgur.com/TtYGc.png

1 Answers1

0

If you are using Matlab's Symbolic Math Toolbox™ (meaning using syms to create symbolic variables and combining those into functions etc...) then the symplify function should do the trick. For more read: Preforming symbolic computations