Effectivenormalstress=[41,79,119,159,197,80];
Maximumshearstress=[34,73,97,138,173,56];
x=Effectivenormalstress;
y=Maximumshearstress;
scatter(x, y, 'rx');
xlabel('Effective normal stress');
ylabel('Shear stress');
sgtitle('Interpretation for angles of shearing resistance');
coefficients=polyfit(x, y, 1);
xFit=linspace(min(x),max(x),1000);
yFit=polyval(coefficients, xFit);
hold on;
plot(xFit,yFit,'b-' , 'LineWidth',1);
grid on;
Best Answer