def mt_rekursi(res,tebal,freq): k = np.sqrt(1j*2.*np.pi*4.*np.pi*1e-7*(freq/res)) t = tebal c = k[-2]/k[-1] for i in range(len(res)-2,0,-1): c = k[i-1]/k[i]*mpm.coth(k[i]*t[i]+mpm.acoth(c)) c = 1./k[0]*mpm.coth(k[0]*t[0]+mpm.acoth(c)) # if c.real!=c.real and c.imag!=c.imag: # print 'res',res[:5] return c
# -*- coding: utf-8 -*- """ Created by libsedmlscript v0.0.1 """ from sed_roadrunner import model, task, plot from mpmath import acoth #---------------------------------------------- acoth(0.5)
def eval(self, z): return mpmath.acoth(z)