MATLAB: How fix this message Undefined function ‘partfrac’ for input arguments of type ‘sym’. ??

MATLABpartial fraction problem

i want partial fraction of this expression x^2/(x^3 – 3*x + 2) when i use partfrac function in matlab as following syntax syms x partfrac(x^2/(x^3 – 3*x + 2))
this message appear: Undefined function 'partfrac' for input arguments of type 'sym'.
Error in testpartfrac0 (line 2) partfrac(x^2/(x^3 – 3*x + 2))
i don`t now how solve this problem, please help me

Best Answer

If you didn't have Symbolic Math Toolbox, the call to syms would have thrown the error.
This message indicates you're using release R2013a. If that's correct, that is the reason you can't call partfrac. The note at the end of its documentation page indicates it was introduced in release R2015a, four releases after the one you're using. You will need to upgrade to release R2015a or later to use this function.