index=zeros(nnel*ndof,1);
keq=zeros(nel+1,nel+1,l);
kk(:,:,:)=zeros(sdof, sdof,l);
ss(:,:)=zeros(sdof, sdof);
k0 = (ka/le)*[1 -1;-1 1];
m = (P * h * le) / (6 * Ac) * [2 1; 1 2];
s = (q0 + (P*h/Ac)*Tinf)*[le*0.5;le*0.5];
s = repmat(s, [1, 1, l]);
m = repmat(m, [1, 1, l]);
start = (iel-1)*(nnel-1)*ndof;
mm(ii,jj)=mm(ii,jj)+m(i,j,l);
ss(ii,jj)=ss(ii,jj)+s(i,j,l);
e(i)=tleng/2*nel+(tleng/nel)*(i-1);
R(i,j)=sigma^2*exp(-abs(ee(i,j)/d));
el2= 1 + zeros( 1, 100 );
el3=[0.90991 0.98608 0.90314 1.1458 1.0554 0.91364 1.3918 0.61164 0.74829 1.369];
start = (iel-1)*(nnel-1)*ndof;
kk(ii,jj,l)=kk(ii,jj,l)+k(i,j,iel);
temp(:,:,l)=keq3(:,:,l)\A2(:,:,l);
x= linspace(0,tleng,nel+1);
mean_temp =mean(temp1,2) ;
mean_temp(1:3)
ans =
300.0000
341.6619
340.4453