
load memb.dat -ascii;
[elts,tmp] = size(memb);
% memb(1) = m, memb2 = (n);
if (tmp ~= 1 | memb(1)*memb(2) ~= elts-2)
   error "memb.dat must be a single column: [m; n; col1; ...; coln]"
end

m = memb(1);
n = memb(2);
memb = reshape(memb(3:elts),m,n);

j = 1:n;
x(j) = (j-1)/ (n-1);
i = 1:m;
y(i) = (i-1)/ (m-1);

figure(1);
surf(x,y,memb);
set(gca, 'title',text(0,0,'Membrane position'));
set(gca, 'xlabel',text(0,0,'X'));
set(gca, 'ylabel',text(0,0,'Y'));

figure(2);
surfl(x,y,memb);
set(gca, 'title',text(0,0,'Membrane position - lighting'));
set(gca, 'xlabel',text(0,0,'X'));
set(gca, 'ylabel',text(0,0,'Y'));
