% FEAcomp. Solution of Example 5.4.
% J.A. Mayugo & E. J. Barbero (c) 2006, 2007, 2013
clc; clear all; close all;

b=10;

% Ansys results OPEN I FILES
n_file = 'FEAcomp_Ex54';
fidinp = fopen([n_file,'.txt'],'r');   
label  = (fscanf(fidinp,'%s %s',[2 1]));
results = (fscanf(fidinp,'%g %g',[2 inf]));
fclose(fidinp);

y_b=results(1,:)/b;
s_xz=results(2,:);

linetxt1 = ['\leftarrow \delta_{0}= Th/100'];
linewth  = 2.8;

figure1 = figure;
plot(y_b,s_xz,'LineWidth',linewth);
hold on;
plot([0,1],[0,0]);
%text(results2(2,120)+2.2,results2(1,120),linetxt1,'HorizontalAlignment','left','Fontsize',16)
axis([0 1 -60 40]);
xlabel('y/b','Fontsize',16);ylabel('\sigma [MPa]','Fontsize',16);
legend('\sigma_{xz}','Location','SouthWest'):legend('boxoff');
set(gca,'Fontsize',16);
hold off;
     

