matlab how to write ^2 in string code example Example: num to string matlab str = num2str(A) str = num2str(A, precision) str = num2str(A, format)