Matlab和Excel交互——数字和列名转换
来源:互联网 发布:js怎么获取时间戳 编辑:程序博客网 时间:2024/05/29 02:40
clcclearclose all% 绘制正四面体FirstPoint = [8 1];SecondPoint = [14 3.5];ThirdPoint = [2 5];FourthPoint = [9 13];xx1 = linspace(FirstPoint(1),SecondPoint(1),10000);yy1 = interp1([FirstPoint(1),SecondPoint(1)],[FirstPoint(2),SecondPoint(2)],xx1);xx2 = linspace(FirstPoint(1),ThirdPoint(1),10000);yy2 = interp1([FirstPoint(1),ThirdPoint(1)],[FirstPoint(2),ThirdPoint(2)],xx2);xx3 = linspace(FirstPoint(1),FourthPoint(1),10000);yy3 = interp1([FirstPoint(1),FourthPoint(1)],[FirstPoint(2),FourthPoint(2)],xx3);xx4 = linspace(SecondPoint(1),ThirdPoint(1),10000);yy4 = interp1([SecondPoint(1),ThirdPoint(1)],[SecondPoint(2),ThirdPoint(2)],xx4);xx5 = linspace(SecondPoint(1),FourthPoint(1),10000);yy5 = interp1([SecondPoint(1),FourthPoint(1)],[SecondPoint(2),FourthPoint(2)],xx5);xx6 = linspace(ThirdPoint(1),FourthPoint(1),10000);yy6 = linspace(ThirdPoint(2),FourthPoint(2),10000);xx = linspace(FourthPoint(1),SecondPoint(1),19);yy = interp1([SecondPoint(1),FourthPoint(1)],[SecondPoint(2),FourthPoint(2)],xx);FinalX(1,7:24) = xx(1,1:18);FinalY(1,7:24) = yy(1,1:18);FinalX(1) = FirstPoint(1);FinalY(1) = FirstPoint(2);FinalX(2) = xx1(523);FinalY(2) = yy1(523);FinalX(3) = SecondPoint(1);FinalY(3) = SecondPoint(2);FinalX(4) = xx2(523);FinalY(4) = yy2(523);FinalX(5) = ThirdPoint(1);FinalY(5) = ThirdPoint(2);FinalX(6) = xx3(523);FinalY(6) = yy3(523);FinalX(25) = FourthPoint(1);FinalY(25) = FourthPoint(2);Data = [0.1977 0.1130 0.0000 0.3672 0.2044 0.1130 0.0000 0.0000 0.0000 0.0001 0.0002 0.0003 0.0004 0.0005 0.0006 0.0006 0.0006 0.0005 0.0004 0.0002 0.0001 0.0001 0.0000 0.0000 0.0000 0.1979 0.1131 0.0004 0.3675 0.0003 0.1131 0.0006 0.0012 0.0025 0.0047 0.0081 0.0125 0.0179 0.0233 0.0274 0.0288 0.0265 0.0212 0.0148 0.0091 0.0050 0.0025 0.0011 0.0004 0.0001 0.1735 0.1129 0.0005 0.2998 0.0002 0.1077 0.0007 0.0016 0.0034 0.0064 0.0111 0.0176 0.0254 0.0333 0.0392 0.0409 0.0378 0.0310 0.0227 0.0151 0.0092 0.0052 0.0027 0.0013 0.0003 ];TitleData = [2.5,0.1; 2.5,1; 2.5,1.4];Label = {'(a)' '(b)' '(c)'};W = get(0,'ScreenSize');figure;set(gcf,'Position',[0.1*W(3) 0.3*W(4) 0.8*W(3) 0.4*W(4)]);for jj = 1:1:3 SubName{1} = subplot(1,3,jj); set(SubName{1},'Position',[0.05+0.3*(jj-1) 0.05 0.27 0.85]); scatter(xx1,yy1,0.6,'k','.'); hold on; scatter(xx2,yy2,0.6,'k','.'); hold on; scatter(xx3,yy3,0.6,'k','.'); hold on; scatter(xx4,yy4,0.6,'k','.'); hold on; scatter(xx5,yy5,0.6,'k','.'); hold on; scatter(xx6,yy6,0.6,'k','.'); hold on c = Data(jj,:); scatter(FinalX,FinalY,[],c,'filled','MarkerEdgeColor',[0 .5 .5]); CBar = colorbar; load Mymap; colormap(Mymap); axis([0 18 0 16]); axis off; text(FirstPoint(1)-1,FirstPoint(2)-0.5,'L','FontSize',14); text(SecondPoint(1)+1,SecondPoint(2),'P','FontSize',14); text(ThirdPoint(1)-2,ThirdPoint(2),'D','FontSize',14); text(FourthPoint(1),FourthPoint(2)+1,'C','FontSize',14); text(ThirdPoint(1)-2,16,cell2mat(Label(jj)),'FontSize',15); title(['r = ' num2str(TitleData(count,1)) ',\sigma = ' num2str(TitleData(count,2))]);end
阅读全文
0 0
- Matlab和Excel交互——数字和列名转换
- 字母和数字的转换——Excel列名
- 字母和数字的转换——Excel列名
- EXCEL列名与数字之间转换
- -------------------------数字转换成EXCEL列名---------------------------------
- excel列名和序列之间的转换
- Excel列名与数字的相互转换
- Python Excel 列名转换
- 横竖表转换和列名修改
- excel中列字母和数字互换
- java JXL POI EXCEL 列坐标 和 从0开始的数字下标 的相互转换
- 数字转换成excel列名(10进制到Excel的26进制的转换函数)
- matlab中实现文字和数字和混输出excel
- SQL——指定表名和列名,删除对应的列
- SQL——指定表名和列名,删除对应的列
- MATLAB与excel数据交互——读取excel
- Matlab如何导入带有字符和数字的Excel文档?
- matlab 行和列
- react+webpack+es6详细配置教程
- 实时通讯音视频互动开发需求汇总
- Remove Element
- C语言文件读写操作
- Linux基本命令
- Matlab和Excel交互——数字和列名转换
- CNCC day3 迈向新一代人工智能(AI2.0)的多媒体计算
- HDU5071 chat
- HTML5与CSS3新增特性
- mysql事务经典问题
- HTML事件
- 求π的近似值
- [LeetCode] Jump Game II
- vue.js入门(五)——如何操作底层DOM