view axPos.m @ 1037:2d7ba44340d0 feature/burgers1d

Pass scheme specific parameters as cell array. This will enabale constructDiffOps to be more general. In addition, allow for schemes returning function handles as diffOps, which is currently how non-linear schemes such as Burgers1d are implemented.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Fri, 18 Jan 2019 09:02:02 +0100
parents 8979d81515ac
children
line wrap: on
line source

function axPos(n,m)
    a = {};
    aPos = [];
    for i = 1:n*m
        a{i} = subplot(n, m, i);
        aPos(i,:) = a{i}.Position;
    end

    dx = aPos(1,3);
    dy = aPos(1,4);

    x = unique(aPos(:,1));
    y = unique(aPos(:,2));


    fprintf('dx: %f\n', dx);
    fprintf('dy: %f\n', dy);

    fprintf(' x: ');
    fprintf('%f ', x);
    fprintf('\n');

    fprintf(' y: ');
    fprintf('%f ', y);
    fprintf('\n');
end