I'm not sure if there's a specific function, but as a workaround you can try the below code in a MATLAB Live Script.
[num, den] = tfdata(transfer_function);
eqn_top = poly2sym(num,s);
eqn_bot = poly2sym(den,s);
result = eqn_top/eqn_bot
On the side, this should print the system's transfer function, formatted like an equation. You right-click to copy it in standard, LaTeX or MathML formats (I think Windows equation editor can understand LaTeX).
I ran this code with a test system and got this output: