Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 设置图像的大小_Image_Matlab_Visualization_Matlab Figure_Subplot - Fatal编程技术网

Image 设置图像的大小

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;

我已经创建了一个图像,它是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;
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);
其中: