diff axPos.m @ 167:15baeb35f74e feature/grids

Merge in changes from default.
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 23 Feb 2016 13:25:43 +0100
parents 8979d81515ac
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/axPos.m	Tue Feb 23 13:25:43 2016 +0100
@@ -0,0 +1,26 @@
+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