The trimean can be viewed as the average of median and average of the lower and upper quartiles. A fairly simply function is defined here.
TM(x)
x
variable of interest
Prabhanjan N. Tattar
TMH, mean, median