matlab绘图时怎么图像显示只有坐标没有曲线?
figure('Position',[100100600400],'MenuBar','none','NumberTitle','off','Name','图形演示系统'...
figure('Position',[100 100 600 400],'MenuBar','none','NumberTitle','off','Name','图形演示系统');
hplot=uimenu(gcf,'Label','&Plot');
uimenu(hplot,'Label','Sine Wave','Call',['t=0;pi/50;2*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=0;pi/50;2*pi;','plot(t,cos(t));',...
'set(hgon,''Enable'',''on'');','set(hgoff,''Enable'',''on'');','set(hbon,''Enable'',''on'');','set(hboff,''Enable'',''on'');']);
hoption=uimenu(gcf,'Label','&Option');
hgon=uimenu(hoption,'Label','&Grig on','Call','grid on','Enable','on');
hgoff=uimenu(hoption,'Label','&Grig off','Call','grid off','Enable','on');
hbon=uimenu(hoption,'Label','&Box on','separator','on','Call','box on','Enable','on');
hboff=uimenu(hoption,'Label','&Box off','Call','box off','Enable','off');
hfigcor=uimenu(hoption,'Label','&Figure Color');
uimenu(hfigcor,'Label','&Red','Call','set(gcf,''Color'',''r'');');
uimenu(hfigcor,'Label','&Blue','Call','set(gcf,''Color'',''b'');');
uimenu(hfigcor,'Label','&Yellow','Call','set(gcf,''Color'',''y'');');
uimenu(hfigcor,'Label','&White','Call','set(gcf,''Color'',''w'');');
hquit=uimenu(gcf,'Label','&Quit','Call','close(gcf)');
这个程序运行后出现下面的界面:
点击Plot 下拉菜单的Sine Wave后出现的图形只有坐标轴,没有正弦曲线。怎么回事? 展开
hplot=uimenu(gcf,'Label','&Plot');
uimenu(hplot,'Label','Sine Wave','Call',['t=0;pi/50;2*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=0;pi/50;2*pi;','plot(t,cos(t));',...
'set(hgon,''Enable'',''on'');','set(hgoff,''Enable'',''on'');','set(hbon,''Enable'',''on'');','set(hboff,''Enable'',''on'');']);
hoption=uimenu(gcf,'Label','&Option');
hgon=uimenu(hoption,'Label','&Grig on','Call','grid on','Enable','on');
hgoff=uimenu(hoption,'Label','&Grig off','Call','grid off','Enable','on');
hbon=uimenu(hoption,'Label','&Box on','separator','on','Call','box on','Enable','on');
hboff=uimenu(hoption,'Label','&Box off','Call','box off','Enable','off');
hfigcor=uimenu(hoption,'Label','&Figure Color');
uimenu(hfigcor,'Label','&Red','Call','set(gcf,''Color'',''r'');');
uimenu(hfigcor,'Label','&Blue','Call','set(gcf,''Color'',''b'');');
uimenu(hfigcor,'Label','&Yellow','Call','set(gcf,''Color'',''y'');');
uimenu(hfigcor,'Label','&White','Call','set(gcf,''Color'',''w'');');
hquit=uimenu(gcf,'Label','&Quit','Call','close(gcf)');
这个程序运行后出现下面的界面:
点击Plot 下拉菜单的Sine Wave后出现的图形只有坐标轴,没有正弦曲线。怎么回事? 展开
3个回答
展开全部
是冒号,不是分号。
uimenu(hplot,'Label','Sine Wave','Call',['t=0:pi/50:2*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=0:pi/50:2*pi;','plot(t,cos(t));',...
'set(hgon,''Enable'',''on'');','set(hgoff,''Enable'',''on'');','set(hbon,''Enable'',''on'');','set(hboff,''Enable'',''on'');']);
uimenu(hplot,'Label','Sine Wave','Call',['t=0:pi/50:2*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=0:pi/50:2*pi;','plot(t,cos(t));',...
'set(hgon,''Enable'',''on'');','set(hgoff,''Enable'',''on'');','set(hbon,''Enable'',''on'');','set(hboff,''Enable'',''on'');']);
展开全部
本视频展示如何用matlab绘制散圆状态图,可用于相关科研数据绘图!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
uimenu(hplot,'Label','Sine Wave','Call',['t=0;pi/50;2*pi;','plot(t,sin(t));'
貌似这行问题?
这行你把命令执行一下就会发现出不来图!
我晕,不是t=0的问题,我再看看
貌似这行问题?
这行你把命令执行一下就会发现出不来图!
我晕,不是t=0的问题,我再看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询