% RESULTS for Young's modulus:
% 20x100: 180 GPa
% 50x100: 186 GPa

x = 100;
% units: microns, uN/nm
thin_data = [x-10, 0.0098;
             x-20, 0.0139;
             x-30, 0.0207];

thick_data = [x-10, 0.0279;
              x-20, 0.0403;
              x-30, 0.0614];
         
% processing data according to x vs. k^(-1/3)
input = thin_data;
W = 21.56;
L = 101.82;

% input = thick_data;
% W = 51.51;
% L = 102.72;

t = 1.96e-6;

% convert everything into standard SI
W = W*1e-6;
L = L*1e-6;
input(:,1) = 1e-6*input(:,1);
input(:,2) = 1e3*input(:,2);

input(:,2) = input(:,2).^(-1/3);

plot(input(:,1),input(:,2),'*');
p = polyfit(input(:,1),input(:,2),1);

E = 4/(p(1)^3*W*t^3);

E*1e-9 % Display result in GPa