软件编程版 #295311 层

关于创建菜单的问题

楼主 · 1 楼
以下是创建菜单的几句程序,可总出现错误
h = figure;
hm=uimenu(h,'label','&Color');
hsm=uimenu(hm,'label','&green','callback','set(gcf,"color","green")');
hsm2=uimenu(hm,'label','&yellow','callback','set(gcf,"color","yellow")','Accelerator','y');

??? Error: Missing variable or function.

??? Error while evaluating uimenu Callback.
请问各位大侠是什么原因?谢谢!!