MATLAB怎样画出高数课本上的的这些区间示意图-创新互联
MATLAB怎样画出高数课本上的的这些区间示意图
代码:
close all
%% 微信公众号:海洋与大气科学
%% 作者:mapm:QQ:916490285
%% 时间:2022年12月1号
%% 1:双闭区间
figure
set(gcf,'color','w')
scatter(0,0,'o','MarkerEdgeColor','black','MarkerFaceColor','black');
hold on
scatter(1,0,'o','MarkerEdgeColor','black','MarkerFaceColor','black');
hold on
scatter(5,0,'o','MarkerEdgeColor','black','MarkerFaceColor','black');
hold on
annotation('arrow',[0.2 0.8],[0.52 0.52],'LineStyle','-','color',[0 0 0],'HeadStyle','cback3');
hold on
line([1,5],[1,1],'color','k')
hold on
line([1,1],[0,1],'color','k')
hold on
line([5,5],[0,1],'color','k')
axis([-2 8 -10 10])
hold on
for i=1:0.5:4.5
line([i,i+0.5],[0,1],'color','k')
hold on
end
text(0,-1,'O','fontsize',14,'fontweight','bold','fontname','time news roman')
text(1,-1,'a','fontsize',14,'fontweight','bold','fontname','time news roman')
text(5,-1,'b','fontsize',14,'fontweight','bold','fontname','time news roman')
text(6.5,-1,'x','fontsize',14,'fontweight','bold','fontname','time news roman')
text(2,2,'[a,b]','fontsize',14,'fontweight','bold','fontname','time news roman')
set(gca,'xtick',[],'xticklabel',[],'xcolor','w','ytick',[],'yticklabel',[],'ycolor','w')
title('双闭区间','fontsize',14,'fontweight','bold','fontname','黑体')
export_fig('双闭区间.png','-r300')
%% 2:双开区间
figure
set(gcf,'color','w')
scatter(0,0,'o','MarkerEdgeColor','black','MarkerFaceColor','black');
hold on
scatter(1,0,'o','MarkerEdgeColor','black','MarkerFaceColor','w');
hold on
scatter(5,0,'o','MarkerEdgeColor','black','MarkerFaceColor','w');
hold on
annotation('arrow',[0.2 0.8],[0.52 0.52],'LineStyle','-','color',[0 0 0],'HeadStyle','cback3');
hold on
line([1,5],[1,1],'color','k')
hold on
line([1,1],[0,1],'color','k')
hold on
line([5,5],[0,1],'color','k')
axis([-2 8 -10 10])
hold on
for i=1:0.5:4.5
line([i,i+0.5],[0,1],'color','k')
hold on
end
text(0,-1,'O','fontsize',14,'fontweight','bold','fontname','time news roman')
text(1,-1,'a','fontsize',14,'fontweight','bold','fontname','time news roman')
text(5,-1,'b','fontsize',14,'fontweight','bold','fontname','time news roman')
text(6.5,-1,'x','fontsize',14,'fontweight','bold','fontname','time news roman')
text(2,2,'(a,b)','fontsize',14,'fontweight','bold','fontname','time news roman')
set(gca,'xtick',[],'xticklabel',[],'xcolor','w','ytick',[],'yticklabel',[],'ycolor','w')
title('双开区间','fontsize',14,'fontweight','bold','fontname','黑体')
export_fig('双开区间.png','-r300')
%% 3 左开右闭
figure
set(gcf,'color','w')
scatter(0,0,'o','MarkerEdgeColor','black','MarkerFaceColor','black');
hold on
scatter(1,0,'o','MarkerEdgeColor','black','MarkerFaceColor','w');
hold on
scatter(5,0,'o','MarkerEdgeColor','black','MarkerFaceColor','k');
hold on
annotation('arrow',[0.2 0.8],[0.52 0.52],'LineStyle','-','color',[0 0 0],'HeadStyle','cback3');
hold on
line([1,5],[1,1],'color','k')
hold on
line([1,1],[0,1],'color','k')
hold on
line([5,5],[0,1],'color','k')
axis([-2 8 -10 10])
hold on
for i=1:0.5:4.5
line([i,i+0.5],[0,1],'color','k')
hold on
end
text(0,-1,'O','fontsize',14,'fontweight','bold','fontname','time news roman')
text(1,-1,'a','fontsize',14,'fontweight','bold','fontname','time news roman')
text(5,-1,'b','fontsize',14,'fontweight','bold','fontname','time news roman')
text(6.5,-1,'x','fontsize',14,'fontweight','bold','fontname','time news roman')
text(2,2,'(a,b]','fontsize',14,'fontweight','bold','fontname','time news roman')
set(gca,'xtick',[],'xticklabel',[],'xcolor','w','ytick',[],'yticklabel',[],'ycolor','w')
title('左开右闭','fontsize',14,'fontweight','bold','fontname','黑体')
export_fig('左开右闭.png','-r300')
%% 4 左闭右开
figure
set(gcf,'color','w')
scatter(0,0,'o','MarkerEdgeColor','black','MarkerFaceColor','black');
hold on
scatter(1,0,'o','MarkerEdgeColor','black','MarkerFaceColor','k');
hold on
scatter(5,0,'o','MarkerEdgeColor','black','MarkerFaceColor','w');
hold on
annotation('arrow',[0.2 0.8],[0.52 0.52],'LineStyle','-','color',[0 0 0],'HeadStyle','cback3');
hold on
line([1,5],[1,1],'color','k')
hold on
line([1,1],[0,1],'color','k')
hold on
line([5,5],[0,1],'color','k')
axis([-2 8 -10 10])
hold on
for i=1:0.5:4.5
line([i,i+0.5],[0,1],'color','k')
hold on
end
text(0,-1,'O','fontsize',14,'fontweight','bold','fontname','time news roman')
text(1,-1,'a','fontsize',14,'fontweight','bold','fontname','time news roman')
text(5,-1,'b','fontsize',14,'fontweight','bold','fontname','time news roman')
text(6.5,-1,'x','fontsize',14,'fontweight','bold','fontname','time news roman')
text(2,2,'[a,b)','fontsize',14,'fontweight','bold','fontname','time news roman')
set(gca,'xtick',[],'xticklabel',[],'xcolor','w','ytick',[],'yticklabel',[],'ycolor','w')
title('左闭右开','fontsize',14,'fontweight','bold','fontname','黑体')
export_fig('左闭右开.png','-r300')
你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧
新闻名称:MATLAB怎样画出高数课本上的的这些区间示意图-创新互联
浏览路径:http://hbruida.cn/article/dioihp.html