发布网友 发布时间:2022-04-22 09:03
共1个回答
热心网友 时间:2023-05-07 02:29
clear;clc;
A=unifrnd(-.5,.5,10,10);
B=100*[A,0*A(:,1);0*A(1,:),0]
[m,n]=meshgrid(1:11);
surf(m,n,0*m,B,'linestyle',':');
%%%%%%%%%自定义颜色%%%%%%%%%%%
map=ones(199,3);
c=linspace(0,1)';
map(1:100,[2,3])=[c,c];
map(199:-1:100,[1,3])=[c,c];
colormap(map);
colorbar([-50,50]);
%%%%%%%%%%%%%%%%%%%%%%%%%%
view(2);axis ij
axis([1,11,1,11])
set(gca,'xtick',1.5:10.5,'xticklabel',char('A'+(0:9)'),'ytick',1.5:10.5,'yticklabel',{-39.3,-29.6,-17.7,-10.5,-2.4,8.7,14.9,27,37,44})
[m,n]=meshgrid(1.5:10.5);
%%%%%%%%显示百分比%%%%%%%%%%%%
text(m(:),n(:),cellfun(@(x)[num2str(x),'%'],num2cell(round(A(:)*100)),'UniformOutput',false),'HorizontalAlignment','center','color','b')追问
老哥 能不能帮忙看一下网页链接2017数学建模B题 怎么把任务在地理位置的热图画出来?