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个回答
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询