MATLAB: How to get smith form of a matrix in matlab

MATLAB

When i tried this code: syms x A = [x^2 + 3, (2*x – 1)^2; (x + 2)^2, 3*x^2 + 5] S = smithForm(A) I got following error: Undefined function or method 'smithForm' for input arguments of type 'sym'. How to resolve this.

Best Answer