Skip to content
Advertisement

Tag: trigonometry

Sympy calculation on tan function

I have a problem when simplifying a symbolic expression in sympy when having a trigonometric function and a complex exponent, namely I just assumed a different definition of tan function, and I have a weird thing going on. So I do: Symbolic variable sym.simplify(test2) is equal to -tan(a) and normaly test1 variable should be equal to 0, however when I

curve fitting sine to the power of python

I want to fit a signal into a cos or sine function: reference signal: And this signal must fit into model: By doing: I am getting: params a = 11.9; b = 0.97 and n=1 This doesn’t match at all… Answer putting these suggestions together gives the following: which recovers your parameters. the bounds enforces positivity, while the p0 gives

Advertisement