function FEM_code_mixed()
clear ;
close all;
clc
n=10;
nn=n+1;
lgth=1;
he=lgth/n;
x=(0:he:lgth);
AC=0.00005;
F=zeros(nn,1);
F(1)=1;
F(nn)=exp(1);
c=1.0;
count=0;
tic
while(c>0)
[F1]=assembly(F,n,he);
c=0.0;
for i=1:nn
if(abs(F(1)-F1(1))>AC)
c=c+1;
break;
end
end
F=F1;
count=count+1;
end
disp('Hence solution: ');
fprintf('No of elements=%d\n',n)
%disp('No of elements=%d\n',n)
disp(' x FEM Exact Error')
disp([x',F,exp(x)',diff])
fprintf('No of iterations=%d\n',count)
toc
end