Matlab 如何提高.png输出中的横向图像分辨率?

Matlab 如何提高.png输出中的横向图像分辨率?,matlab,ubuntu,Matlab,Ubuntu,情况:无法在导出图的.png输出中提高横向分辨率 目标:在每次迭代后获得越来越多的横向分辨率 我可以增加矩阵(时间)中确定y轴方向的点的数量。 时间轴在每次迭代中有2倍多的点。export\u fig的输出在每次迭代中保持为正方形,导致峰值的振幅在每次迭代中越来越小。 伪码 counter=1; while (counter < 4); potential=linspace(0,100, 200); timeEndSeconds=counter*10; time=l

情况:无法在导出图的.png输出中提高横向分辨率 目标:在每次迭代后获得越来越多的横向分辨率

我可以增加矩阵(
时间
)中确定y轴方向的点的数量。 时间轴在每次迭代中有2倍多的点。
export\u fig
的输出在每次迭代中保持为正方形,导致峰值的振幅在每次迭代中越来越小。 伪码

counter=1;
while (counter < 4);
    potential=linspace(0,100, 200);
    timeEndSeconds=counter*10;
    time=linspace(0, timeEndSeconds, 2*timeEndSeconds);

    % computere here anything to the presentation etc Sin
    %Presentation = sin(time); % gives dimensions 1x20, but should be 1x200 i.e. asserted by potential`s linspace but not sure how to ensure it

    width=50; 
    height=50; 
    figure('Position', [100 100 width height]);

    imagesc(time, potential, Presentation);

    filename=fullfile('/home/masi/Desktop/', counter);
    % https://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig
    % TODO ensure here the specific resolution in time x potential for the image
    export_fig(filename, '-png','-dpng', gcf);

    counter=counter+1;
end
打开

  • linspace
    更好地集成到
    图中的
    位置
系统:Linux Ubuntu 16.04 64位
Matlab:2016a
文档:

硬件:Macbook Air 2013年中期

Suever的答案:调整您的体型大小。
有更好的动态环境,等等,在这些情况下使用Mathematica

那么您希望导出的
png
每次都有更多的宽度像素?e、 g.开始时为300x400,但过了一段时间后为300x800?这与导出图无关,您只需调整图形的大小或更改图形的
ylims
axes@Ander是的,你是right@Suever是的,你说得对。看看尸体。
lims
在这里有什么好处吗?我认为在动态情况下,仅仅调整数字大小可能会有问题。
% Use swap as described in http://askubuntu.com/q/799834/25388
if (counter > 1)
    height=50; 
    width=50*counter;
    set(gcf, 'Position', [100 100 width height]);
end