问题描述
现在,我想将这两个图像水平放置在同一图中。 谁能帮助我?
这是我的代码。
function cylinder = createSurfCylinder(matrix)
%Load heat map.
load('myHeatMap.mat','myHeatMap');
Sample_Range = 255 - 0;
Temperature_Range = 450 - 50;
Multiplier = Temperature_Range/Sample_Range;
map100 = matrix.*Multiplier + 50;
Maximum_Value = 450;
Minimum_Value = 50;
%creates a image
k = imshow(map100);
%creates a colormap.
%gca returns the current axes (or standalone visualization) in the current figure.
%hence the command just works top down and affects last image displayed.
colormap(myHeatMap);
caxis([Minimum_Value Maximum_Value]);
colorbar;
%Setting up the figure%
Radius = 1.5;
Number_Of_Data_Points = 360;
theta = linspace(0,2*pi,Number_Of_Data_Points);
%The xy values according to radius and number of points%
Z_Circle = Radius*cos(theta);
Y_Circle = Radius*sin(theta);
map100 = rot90(map100);
Height = 512;
Z_Circle = repmat(Z_Circle,Height,1);
Y_Circle = repmat(Y_Circle,1);
X_Length = (1:512)';
X_Length = repmat(X_Length,1,Number_Of_Data_Points);
figure('Position',[10 10 500 500])
%surf(X_Circle,Y_Circle,Z_Height,'Cdata',map100); vertical
cyl = surf(X_Length,Z_Circle,map100);
title("3D Heatmap Plot");
zlabel("Z-Position");
ylabel("Y-Position");
xlabel("Length(Cm)");
%Reverse Y axis.
set(gca,'Ydir','reverse')
colormap(myHeatMap);
colorbar;
shading interp
max(map100,[],'all')
caxis([Minimum_Value Maximum_Value]);
cylinder = cyl;
end
我尝试使用子图,但事实证明,iv现在停留在这件事上已经4h了,真的可以使用一些帮助。
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)