added idmclib error messages reporting
[iDMC.git] / models / sinecircle.lua
blob07fe54a2b3d410f22b8642f57499a89e044db851
1 name = "sine circle"
2 description = "See Model refs in user's guide"
3 type = "D"
4 parameters = {"omega", "k"}
5 variables = {"theta"}
7 function f(omega, k, theta)
9 two_pi = 2 * math.pi
11 y1 = theta + omega + (k/two_pi)*math.sin(two_pi*theta)
13 y2 = math.mod(y1, 1)
15 return y2
17 end
19 function Jf(omega, k, theta)
21 return 1 + k*cos(two_pi*theta)
22 end