(i).Elements(n) : corresponds to the i-th part'sn-th element (struct)
% parts(i).Elements(n).Type : corresponds to the i-th part'sn-th element type (string)
% parts(i).Elements
enddo write(*,*)"the solution of equation:" write(*,"(es18.8)")x end subroutine bicgstab依據上述過程編寫程序,計算前述非對稱矩陣線性方程組求解結果:采用matlab求解該方程組的解:通過對比可知11次迭代已經獲得即為準確的結果
.Elements(n) : corresponds to the i-th part'sn-th element (struct)% parts(i).Elements(n).Type : corresponds to the i-th part'sn-th element type (string)% parts(i).Elements(n).Connectivity
code:for iEle =1:EleCount %Calculate the displacement in local coordinates of the rod n1=ele(iEle,2);n2=ele(iEle,3); R=CoordTransform([x(n1) x(n2)],[y(n1) y(n2)],[z(n1) z(n2)],BarLength