| 查看: 1575 | 回复: 5 | ||
szdchris银虫 (小有名气)
|
[求助]
MatlabGui里的popupmenu为什么在运行时不见了?
|
|
想建立一个popupmenu控件,下拉有两个函数,一个叫指数函数,一个叫幂函数,建立时是在其string属性中用"|"来建立的,再建立两个axes控件,当选择指数函数时,将图形显示到axes1中,当选择幂函数时,显示到axes2中,我在属性框中将value值设为1和2,然后在callback中写如下代码: function popupmenu2_Callback(hObject, eventdata, handles) val=get(handles.popupmenu2,'value') switch val case 1 x=0:pi/100:2*pi y=2*exp(-0.5*x) axes(handles.axes1) plot(x,y) set(handles.axes1,'XminorTick','on') grid on case 2 x=0:0.2:3 y=2+3*x+4*x^2 axes(handles.axes2) plot(x,y) set(handles.axes2,'XminorTick','on') grid on end 运行时popupmenu不见了. 窗口中: In gui_mainfcn at 239 In fushuyucexin at 42 Warning: popupmenu control requires a scalar Value Control will not be rendered until all of its parameter values are valid >> 这是为什么呢?是不是代码有误?高手指点. |
» 猜你喜欢
津理工大学晶体材料全国重点实验室刘红军教授课题组招收博士生一名
已经有0人回复
【原创讨论】从电子约束到物质编辑:一套可迭代的环形磁场科技树
已经有0人回复
物理学I论文润色/翻译怎么收费?
已经有274人回复
【方案分享】单环磁场+轴心控制+偏转导出电子束约束系统(可行性实验)
已经有6人回复
【修正版】单环用磁约束低速电子实验方案(简化版)
已经有0人回复
桂林理工大学物理学专业招收调剂,还有三个名额!!!
已经有22人回复
考博自荐
已经有4人回复
山东大学第二批博士研究生招生
已经有0人回复
中国科学院东莞材料科学与技术研究所-2026年博士招生-吴昊研究员-磁学与自旋电子学
已经有0人回复
《电磁学》教材推荐
已经有1人回复
【急招】合肥工大核聚变材料计算方向2026级工程博士生
已经有4人回复
2楼2013-03-22 21:27:05
szdchris
银虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 1055.8
- 散金: 60
- 红花: 4
- 帖子: 223
- 在线: 88.8小时
- 虫号: 1458709
- 注册: 2011-10-24
- 性别: GG
- 专业: 工程地质学
|
我改了,但是还是不行,命令行里还是: Warning: popupmenu control requires a scalar Value Control will not be rendered until all of its parameter values are valid > In gui_mainfcn at 239 In tryxx at 42 Warning: popupmenu control requires a scalar Value Control will not be rendered until all of its parameter values are valid >> 是不是value不能在属性里改 啊?还是什么问题呢 |
3楼2013-03-23 18:39:27
4楼2013-03-23 21:00:34
szdchris
银虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 1055.8
- 散金: 60
- 红花: 4
- 帖子: 223
- 在线: 88.8小时
- 虫号: 1458709
- 注册: 2011-10-24
- 性别: GG
- 专业: 工程地质学
5楼2013-03-24 11:56:12
6楼2015-07-17 00:03:00












回复此楼