(* File: Phi-matrix-pc Author: Hongyou Wu Date: 2000 Sep 01 *) (* *) (* Input: npieces, \[Lambda] *) (* *) (* Optional input: a[i], f[i], q[i], w[i] *) (* *) (* Output: \[Phi]. *) Clear[iZZ,jZZ,kZZ,lZZ,cZZ,dZZ,eZZ,fZZ,tfZZ,gZZ,phZZ,tZZ]; cZZ=\[Lambda]; Do[{fZZ[iZZ,cZZ]=Sqrt[(q[iZZ]-cZZ*w[iZZ])/f[iZZ]]; gZZ[iZZ,1,1,tZZ_,cZZ]=Cosh[fZZ[iZZ,cZZ](tZZ-a[iZZ-1])]; gZZ[iZZ,1,2,tZZ_,cZZ]=If[cZZ==q[iZZ]/w[iZZ], (tZZ-a[iZZ-1])/f[iZZ], Sinh[fZZ[iZZ,cZZ](tZZ-a[iZZ-1])]/f[iZZ]/fZZ[iZZ,cZZ]]; gZZ[iZZ,2,1,tZZ_,cZZ]=f[iZZ]*fZZ[iZZ,cZZ]*Sinh[fZZ[iZZ,cZZ](tZZ-a[iZZ-1])]; gZZ[iZZ,2,2,tZZ_,cZZ]=Cosh[fZZ[iZZ,cZZ](tZZ-a[iZZ-1])]; },{iZZ,1,npieces}]; tfZZ[dZZ_,eZZ_,tZZ_]=If[dZZ<=tZZ&&tZZ<=eZZ,1,0]; Do[phZZ[1,jZZ,kZZ,tZZ_,cZZ]=tfZZ[a[0],a[1],tZZ]gZZ[1,jZZ,kZZ,tZZ,cZZ], {jZZ,1,2},{kZZ,1,2}]; tfZZ[dZZ_,eZZ_,tZZ_]=If[dZZ