%exceltplot.m
%Script to extract data from Instron Excel file and plot the stress strain
%curve.

%Read the Excel of data into a matrix
T=readtable('Labdata.csv');

%Get size of T
nrows=size(T,1);
ncols=size(T,2);

%Extract data into vectors
E=T{1:nrows,2};%Instron directly measured strain
S=T{1:nrows,3};%Instron calculated stress
U=T{1:nrows,4};%Instron recorded position

plot(E,S,'b')
title('Steel bar tension test')
xlabel('strain, \epsilon (in/in)')
ylabel('stress, \sigma (psi)')
