Whats the matlab function Steps pleaseSolutionplotstraintest
Solution
plot(strain_test,stress_test)
x0=xlabel(\'strain, \\epsilon (%)\');
y0=ylabel(\'stress, \\sigma (MPa)\');
title=title(\'Test Curve for Stress and Strain\');
grid on
set(x0,\'fontsize\',12,\'fontweight\',\'normal\')
set(y0,\'fontsize\',12,\'fontweight\',\'normal\')
set(title,\'fontsize\',12,\'fontweight\',\'normal\')
axis([0 0.08 0 80000]) % Limit
figure(0)
plot(strain_test,stress_test)
x0=xlabel(\'strain, \\epsilon (%)\');
y0=ylabel(\'stress, \\sigma (MPa)\');
title=title(\'Test Curve for Stress and Strain\');
axis([0 0.08 0 80000]) %limits
hold on
plot(0.002,55000,\'d\',\'MarkerFaceColor\',\'b\')
plot(0.02,60000,\'d\',\'MarkerFaceColor\',\'b\')
x=linspace(0,0.01,100);
m=277777.8; %elasticity (y2-y1)/(x2-x1)
y=m*x;
plot((x+0.002),y,\'r\')
%File trapez.m
function int = trapez (x,y)
int=0;
for i=1:length(x)-1
sum=(x(i+1)-x(i))*(y(i+1)+y(i))/2;
int=int+sum;
end
end
