Page 12 - Demo
P. 12


                                    Planar Truss Examplefor ComrelAdd-onRCPConsult, 2023-2025Page 12enddoreturnendsubroutineMATMLT(a,b,c,m,n,l)!.....Multiplies the matrixes A(M,N) and B(N,L)!.....Result will be stored in matrix C(M,L).!.....Calling: dimension a(m,n),b(n,l),c(m,l)!..... call MATMLT(a,b,c,m,n,l)implicitreal*8(a-h,o-z)dimensiona(m,n),b(n,l),c(m,l)dok=1,ldoi=1,md=0.doj=1,nd=d+a(i,j)*b(j,k)enddoc(i,k)=denddoenddoreturnendsubroutineLINSOL(a,b,c,m)!.....Solves a system of linear equations A*B=C!.....Result will be stored in vector B(M).!.....Calling: dimension a(m,m),b(m),c(m)!..... call LINSOL(a,b,c,m)implicitreal*8(a-h,o-z)dimensiona(m,m),b(m),c(m)!.....https://stackoverflow.com/questions/37701747/program-to-solve-a-system-of-linear-equations-in-c!.....Triangularizationdoi=1,m-1dok=i+1,mt=a(k,i)/a(i,i)doj=1,ma(k,j)=a(k,j)t*a(i,j)enddoc(k)=c(k)t*c(i)enddoenddo!.....Resolutiondoi=m,1,1b(i)=c(i)doj=m,i+1,-1b(i)=b(i)a(i,j)*b(j)enddob(i)=b(i)/a(i,i)enddoreturnend
                                
   6   7   8   9   10   11   12   13   14   15   16