我做了以下,它完美地:
[c, h] = contourf (X, Y, h);texth = clabel (c, h,“手册”,“字形大小”,20);我= 1:尺寸(texth) textstr = (texth(我),“字符串”);textnum = STR2DOUBLE (textstr);textstrnew = sprintf (% 0.3 f, textnum)组(texth(我),“字符串”,textstrnew);结束