i am using :
S1 = Quiet[
N[s1[[All, All]]/
Sqrt[s1[[All, All]]^2 + s2[[All, All]]^2 + s3[[All, All]]^2] //.
Indeterminate -> 0.]] ;
S2 = Quiet[
N[s2[[All, All]]/
Sqrt[s1[[All, All]]^2 + s2[[All, All]]^2 + s3[[All, All]]^2] //.
Indeterminate -> 0.]] ;
S3 = Quiet[
N[s3[[All, All]]/
Sqrt[s1[[All, All]]^2 + s2[[All, All]]^2 + s3[[All, All]]^2] //.
Indeterminate -> 0.]] ;
to normalize the elements of the 3 matrices. right now i was reading about compile on the Wolfram Reference but in all honesty i am failing to get a working compiled function