R/m2tk.R

Defines functions m2tk

Documented in m2tk

m2tk<-function(m0)
{
   #m consists of diagonal components of a diagonalized moment tensor
   ###  Author Keehoon Kim, UNC, 2012
   mo=sort(m0,decreasing=TRUE)
   M=sum(mo)/3
   Md=mo-M
   if(Md[2]>=0) {k=M/(abs(M)-Md[3])}
   if(Md[2]<0) {k=M/(abs(M)+Md[1])}
   if(Md[2]>0) {T=-2*Md[2]/Md[3]} 
   if(Md[2]==0) {T=0}
   if(Md[2]<0) {T=2*Md[2]/Md[1]}
   return(list(k=k,T=T))
}

Try the RFOC package in your browser

Any scripts or data that you put into this service are public.

RFOC documentation built on Jan. 20, 2018, 9:46 a.m.