[LON-CAPA-users] Hyperbolic Trig Function Problem
Harding, Gene L
glhardin at purdue.edu
Wed Jan 29 18:42:20 EST 2020
Does anyone have experience using the hyperbolic trig functions in LON-CAPA? I have recently been coding some new problems that use the &tanh() function. I was comparing the results to those I got using MATLAB, and after some troubleshooting it appears that the difference is the tanh. Specifically, the &tanh($x) function in LON-CAPA always returns an imaginary value of zero.
Here is the code:
$tanh = &tanh($gamma*$len);
$tanh_real = Re($tanh);
$tanh_imag = Im($tanh);
where $gamma is a complex number and $len is a scalar. MATLAB computes a complex number for tanh in the examples I have tried. Am I doing something wrong? Does LC not compute tanh correctly?
Gene L. Harding, PE
Associate Professor of ECET
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LON-CAPA-users