栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

matlab纯纯小基础

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

matlab纯纯小基础

心形线:

x1=[-2 -1.9 -1.8 -1.7 -1.6 -1.5 -1.4 -1.3 -1.2 -1.1 -1 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2];

y1=[1.6 1.5 1.7 0.7 2 0.5 2.2 0.4 2.3 0.3 2.2 0.2 2 0.1 1.8 0 1.6 -0.2 1.4 -0.3 1.3 -0.4 1.4 -0.3 1.6 -0.2 1.8 0 2 0.2 2.2 0.3 2.3 0.4 2.2 0.5 2 0.7 1.7 1.5 1.6];

plot(x1, y1,'-r.','LineWidth',6)

title('LOVE','Color','r','FontSize',16);

set (gca,'position',[0.1,0.4,0.8,0.4])

 

折线图:

subplot(2,2,1);x=[1 2 3]; y=[1 2 3];y2=[1 4 8]; plot(x,y,'-r.');title('图一','position',[2 -1.1]);hold on;plot(x,y2,'-b.');xlabel('x轴');ylabel('y轴');set(gca,'ygrid','on');legend('1','2','location','north');text(2,2,'love','color','g');subplot(2,2,2);x=[1 2 3]; y=[1 2 3];y2=[1 4 8]; plot(x,y,'-r.');title('图二','position',[2 -1.1]);hold on;plot(x,y2,'-b.');xlabel('x轴');ylabel('y轴');set(gca,'ygrid','on');legend('3','4','location','northoutside');

 

 

柱状图:

figure;bar3h(1,1);hold on;bar3h(2,2);text(1,1.02,'1');text(2,2.02,'2');title('柱形图'); legend('一','二');grid on;set(gca,'xgrid','off');set(gca,'xtick',1:5:84);xlabel('日期');ylabel('钱(w)');set(gca, 'gridcolor', 'k');set(gca, 'gridlinestyle', '--');

set(gca, 'gridalpha', 0.3);set(gca,'xticklabel',{'50','100'});

 

 

制表:

 

data_row1=[68,68,86,43];

data_row2=[48,15,37,25];

data=[data_row1;repmat(data_row2,12,1)];

str1='气旋';str2='TC';

m=13;n=4;

column_name=strcat(str1,num2str((1:n)'));

row_name=strcat(str2,num2str((1:m)'));

set(figure(1),'position',[200 200 450 330]);

uitable(gcf,'Data',data,'Position',[120 120 400 290],'Columnname',column_name,'Rowname',row_name);

 

地图:

a = rand(50,50);

imagesc(a)

axis equal;

grid on

colormap([1 1 1;0 0 0]);

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1005448.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号