SQRTM Compute square root of a matrix. ----begin documentation---- Program: SQRTM Author: John P. Powers (jpp@cpdvax.csc.ti.com) Date: December 1992 Program SQRTM first prompts for the name of a square matrix. The program computes and displays a square root of the given matrix. The computed square root is displayed and stored in FMA. ----end documentation---- ----begin ascii---- \START\ \COMMENT=Compute the square root of a matrix \NAME=SQRTM \FILE=sqrtm.85P Input "Name of matrix? ",MA eigVl MA\->\MAEVAL eigVc MA\->\MAEVEC ln MAEVAL\->\MAFUNC dimL MAEVAL\->\MAEVALD {MAEVALD,MAEVALD}\->\dim MADIAG Fill(0,MADIAG) For(J,1,MAEVALD) MAFUNC(J)\->\MADIAG(J,J) End MAEVEC*MADIAG*MAEVEC\^-1\\->\FMA FMA*.5\->\MA eigVl MA\->\MAEVAL eigVc MA\->\MAEVEC e^ MAEVAL\->\MAFUNC dimL MAEVAL\->\MAEVALD {MAEVALD,MAEVALD}\->\dim MADIAG Fill(0,MADIAG) For(J,1,MAEVALD) MAFUNC(J)\->\MADIAG(J,J) End MAEVEC*MADIAG*MAEVEC\^-1\\->\FMA \STOP\ ----end ascii---- ----begin uue---- begin 644 sqrtm.85p M*BI423@U*BH:#`!#;VUP=71E('1H92!S<75A"`@("`@(""B`0D`E0$2!5-14E1-E0&3`>8M3F%M92!O9B!M871R:7@_(``O M-$U!;]$T34$+.$U!159!3&_2-$U!"SA-045614-OICA-045604P+.$U!1E5. M0V_`.$U!159!3`LY34%%5D%,1&\..4U!159!3$0O.4U!159!3$0/"[\X34%$ M24%';^\01#``+SA-041)04<1;]T0,THO1#$`+SE-045604Q$$6\X34%&54Y# M$#-*$0LX34%$24%'$#-*+S-*$6_>;SA-045614-P.$U!1$E!1W`X34%%5D5# M20LU1DU!;S5&34%P1"XU``LT34%OT31-00LX34%%5D%,;](T34$+.$U!159% M0V^G.$U!159!3`LX34%&54Y#;\`X34%%5D%,"SE-045604Q$;PXY34%%5D%, M1"\Y34%%5D%,1`\+OSA-041)04=O[Q!$,``O.$U!1$E!1Q%OW1`S2B]$,0`O M.4U!159!3$01;SA-04953D,0,TH1"SA-041)04<0,THO,TH1;]YO.$U!159% 90W`X34%$24%'<#A-045614-)"S5&34$,=``` ` end ----end uue----