L = 152.4;
b = 76;
d = 12.5;
data = readmatrix('H-3point_63_1.csv');
displacement = data(:,2);
force = data(:,3);
corr_val = find(force<0|force==0);
if corr_val>0
val = max(corr_val)+1;
else
val = 1;
end
plot(displacement(val:end),force(val:end),'-or')
xlabel('Displacement (mm)')
ylabel('Force (kN)')
peakforce = max(force(val:end));
A = find(force == peakforce);
B = max(A);
hold on
plot(displacement(B),force(B),'r*')
sigma = 3*peakforce*L/(2*b*(d^2));
f=fit(displacement(val:end),force(val:end),'poly6');
plot(f,'b')
df = diff(f);