string1 = sprintf('y = %f * x^{%f}', z(1), z(2))
Remember, using [] concatenation of a numeric value against a string is like using char() on the numeric values, and that means "look in the Unicode tables" rather than "format a number to be printable". Like char(10) does not mean '10', it means Unicode character #10, newline.