hf = figure;hf.Color =[0,1,1];hf.Position = [1,1,300,150];hf.ButtonDownFcn='gtext("hello")';
错误使用 gtext("hello")错误: 输入字符不是 MATLAB 语句或表达式中的有效字符。
计算 Figure ButtonDownFcn 时出错
hf.ButtonDownFcn = @(a)gtext("hello");
就可以啦