matlab大神求助啊
screen=get(0,'screensize');w=screen(3);h=screen(4);figure('color',[1,1,1],'position',...
screen = get(0,'screensize');
w = screen(3);
h = screen(4);
figure('color',[1,1,1],'position',[0.2*h,0.2*h,0.5*w,0.3*h],...
'name','图形演示系统','numbertitle','off','menubar','none');
%定义plot菜单
hplot = uimenu(gcf,'label','&Plot');
uimenu(hplot,'label','Sine Wave','Call',...
['t = -pi:pi/20:pi;','plot(t,sin(t));',...
'set(hgon,"enable","on");', ...
'set(hgoff,"enable","on");', ...
'set(hbon,"enable","on");', ...
'set(hboff,"enable","on");']);
uimenu(hplot,'label','Cosine Wave','Call', ...
['t = -pi:pi/20:pi;','plot(t,cos(t));', ...
'set(hgon,"enable","on");', ...
'set(hgoff,"enable","on");', ...
'set(hbon,"enable","on");', ...
'set(hboff,"enable","on");']);
%定义option菜单
hoption = uimenu(gcf,'label','&Option');
hgon = uimenu(hoption,'label','&Grid on',...
'call','grid on','enable','off');
hgoff = uimenu(hoption,'label','&Grid off',...
'call','grid on','enable','off');
hbon = uimenu(hoption,'label','&Box on',...
'separator','on','call','box on','enable','off');
hbff = uimenu(hoption,'label','&Box off',...
为什么在出现的界面内点击plot下的sine wave,会出现
错误使用 t = -pi:pi/20:pi;plot(t,sin(t));set(hgon,"enable","on");set(hgoff,"enable","on");set(hbon,"enable","on");set(hboff,"enable","on");
错误: 输入字符不是 MATLAB 语句或表达式中的有效字符。 展开
w = screen(3);
h = screen(4);
figure('color',[1,1,1],'position',[0.2*h,0.2*h,0.5*w,0.3*h],...
'name','图形演示系统','numbertitle','off','menubar','none');
%定义plot菜单
hplot = uimenu(gcf,'label','&Plot');
uimenu(hplot,'label','Sine Wave','Call',...
['t = -pi:pi/20:pi;','plot(t,sin(t));',...
'set(hgon,"enable","on");', ...
'set(hgoff,"enable","on");', ...
'set(hbon,"enable","on");', ...
'set(hboff,"enable","on");']);
uimenu(hplot,'label','Cosine Wave','Call', ...
['t = -pi:pi/20:pi;','plot(t,cos(t));', ...
'set(hgon,"enable","on");', ...
'set(hgoff,"enable","on");', ...
'set(hbon,"enable","on");', ...
'set(hboff,"enable","on");']);
%定义option菜单
hoption = uimenu(gcf,'label','&Option');
hgon = uimenu(hoption,'label','&Grid on',...
'call','grid on','enable','off');
hgoff = uimenu(hoption,'label','&Grid off',...
'call','grid on','enable','off');
hbon = uimenu(hoption,'label','&Box on',...
'separator','on','call','box on','enable','off');
hbff = uimenu(hoption,'label','&Box off',...
为什么在出现的界面内点击plot下的sine wave,会出现
错误使用 t = -pi:pi/20:pi;plot(t,sin(t));set(hgon,"enable","on");set(hgoff,"enable","on");set(hbon,"enable","on");set(hboff,"enable","on");
错误: 输入字符不是 MATLAB 语句或表达式中的有效字符。 展开
1个回答
ZESTRON
2024-09-04 广告
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询