cuizhichao 发表于 2006-11-5 18:10

请高手看看问题怎么解决?(谢谢)

set(0,'DefaultUicontrolFontsize',);
x=0.01:pi/20:2*pi;
h=gcf;
menu1=uimenu(h,'Label','线型');
submenu11=uimenu(menu1,'Label','实线');
submenu12=uimenu(menu1,'Label','点划线');
submenu13=uimenu(menu1,'Label','虚线');
submenu14=uimenu(menu1,'Label','双点划线');

menu2=uimenu(h,'Label','颜色');
submenu21=uimenu(menu2,'Label','红色');
submenu22=uimenu(menu2,'Label','蓝色');
submenu23=uimenu(menu2,'Label','黑色');

menu3=uimenu(h,'Label','形状');
submenu31=uimenu(menu3,'Label','正玄');
submenu32=uimenu(menu3,'Label','余玄');
submenu33=uimenu(menu3,'Label','圆');

set(submenu11,'Callback','set(h,"Linestyle","-")')
set(submenu12,'Callback','set(h,"Linestyle","--")')
set(submenu13,'Callback','set(h,"Linestyle",":")')
set(submenu14,'Callback','set(h,"Linestyle","-.")')

set(submenu21,'Callback','set(h,"Color","")')
set(submenu22,'Callback','set(h,"Color","")')
set(submenu23,'Callback','set(h,"Color","")')

set(submenu31,'Callback','h=plot(x,sin(x));')
set(submenu32,'Callback','h=plot(x,cos(x));')
set(submenu33,'Callback','h=plot(pi+sin(x),cos(x));')

[ 本帖最后由 lxq 于 2006-11-5 22:53 编辑 ]

xiaozhe_hi 发表于 2006-11-5 18:41

怎么能发到这个区啊??

lxq 发表于 2006-11-5 22:53

什么问题嘛?

eight 发表于 2007-1-24 19:06

原帖由 cuizhichao 于 2006-11-5 18:10 发表
set(0,'DefaultUicontrolFontsize',);
x=0.01:pi/20:2*pi;
h=gcf;
menu1=uimenu(h,'Label','线型');
submenu11=uimenu(menu1,'Label','实线');
submenu12=uimenu(menu1,'Label','点划线');
submenu13=uim ...

把所有双引号改为单引号试试
页: [1]
查看完整版本: 请高手看看问题怎么解决?(谢谢)