Image 设置图像的大小
我已经创建了一个图像,它是MATLAB中Image 设置图像的大小,image,matlab,visualization,matlab-figure,subplot,Image,Matlab,Visualization,Matlab Figure,Subplot,我已经创建了一个图像,它是MATLAB中imagesc函数的输出 我的问题:如何将转置矩阵的较大图像和较小的规则图显示为子图 我已经为自己尝试了以下代码,但没有走多远。我正在寻找对我所做的事情的评论和建议,以达到我的最终目标 figure(1); hFig = figure(1); set(hFig, 'Position', [100 100 500 500]); subplot(2,1,1) imagesc(normalized_matrix'),colormap(jet) ax = gca;
imagesc
函数的输出
我的问题:如何将转置矩阵的较大图像和较小的规则图显示为子图
我已经为自己尝试了以下代码,但没有走多远。我正在寻找对我所做的事情的评论和建议,以达到我的最终目标
figure(1);
hFig = figure(1);
set(hFig, 'Position', [100 100 500 500]);
subplot(2,1,1)
imagesc(normalized_matrix'),colormap(jet)
ax = gca;
ax.XLimMode = 'manual';
ax.XLim = [0e4 30e4];
ax.XTickLabelMode = 'manual';
ax.XTickLabel = {'0', '5', '10', '15', '20', '25', '30'};
xlabel('Time in Seconds')
subplot(2,1,2)
plot(force_resample)
ax1 = gca;
ax1.XLimMode = 'manual';
ax1.XLim = [0e4 30e4];
ax1.XTickLabelMode = 'manual';
ax1.XTickLabel = {''};
ax1.YLimMode = 'manual';
ax1.YLim = [0 2];
ylabel('Force in Newtons')
ax1.XLimMode = 'manual';
ax1.XLim = [0e4 30e4];
ax1.XTickLabelMode = 'manual';
ax1.XTickLabel = {'0', '5', '10', '15', '20', '25', '30'};
xlabel('Time in Seconds')
将子地块栅格的更多部分指定给图像。e、 g:
%Sample Data
normalized_matrix = [1:10; 11:20; 21:30; 31:40];
force_resample = rand(4,40);
subplot(3,1,1:2); %using 2/3 part of the grid for the image
imagesc(normalized_matrix);
subplot(3,1,3); %using remaining 1/3 part of the grid for plot
plot(force_resample);
其中: