作者shietsd (123)
看板MATLAB
标题[问题] eval 内使用 uicontrol
时间Mon Jul 9 01:11:10 2012
我有一段 code :
for i=1:5
eval('uicontrol(''Parent'',h_uipanelB,''Style'',''checkbox'',''String'',
''Draw Plot'',''Position'',
[num2str(10),num2str(10+i*3),num2str(120),num2str(15)]);');
end
显示结果为 :
??? Error using ==> uicontrol
Value must be numeric
请问该怎麽写才是正确的呢?
PS: eval 原程式为一行无断句 , 那若有断句的话, 後面的 ... 要写成 '...' 吗?
谢谢大家~~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.57.152.2
1F:推 okgogogo:位置要放数字...你放字串他看不懂啊 07/09 01:56
2F:→ shietsd:谢谢 我成功了 甘温 07/09 16:30