steeve88 Thank you for the reply. This gives me values from 2 to -2. I use wind direction values, thus values from 0 to 360, so this is not a reasonable result. Log in or register to post comments December 8, 2014 at 04:41 am - Permalink
KurtB I'm confused now. Can you provide more explanation of what you need here please? Log in or register to post comments December 8, 2014 at 05:56 am - Permalink
steeve88 Actually, I try to separate the wind direction into its two basic components. The nort-south and the east-west. Anyway, I want, if I know the tan(φ), to find the angle φ. Unfortunatelly, I can't take right results using atanh. Log in or register to post comments December 8, 2014 at 06:13 am - Permalink
thomas_braun Wild guess: Maybe you need to convert from degree to radiant before or afterwards? Log in or register to post comments December 8, 2014 at 06:28 am - Permalink
KurtB I am sorry, I still don't understand. Perhaps someone else can help? Log in or register to post comments December 8, 2014 at 06:31 am - Permalink
steeve88 I use direction wind data in degrees. Log in or register to post comments December 8, 2014 at 06:31 am - Permalink
johnweeks Look at Atan2- it takes two inputs to disambiguate the result. John Weeks WaveMetrics, Inc. support@wavemetrics.com Log in or register to post comments December 8, 2014 at 09:07 am - Permalink
steeve88 This gives me back values between -3 and 3, but this is not angle values again. Log in or register to post comments December 9, 2014 at 01:48 am - Permalink
KurtB steeve88 wrote: This gives me back values between -3 and 3, but this is not angle values again. That will be -pi to pi. Try scaling the result by 180/pi. Log in or register to post comments December 9, 2014 at 02:04 am - Permalink
ChrLie Make sure you read the documentation of the commands, e.g. execute the following from the command line: DisplayHelpTopic "atan" DisplayHelpTopic "atan2" this says e.g. for atan2 that the input is expected to be in radians and the output values range from -pi to +pi. Log in or register to post comments December 9, 2014 at 02:05 am - Permalink
steeve88 Thank you very much. That was the problem. Sometimes the solution is in front of our eyes but we can't see it. I converted degrees to radians before the calculations, and finally I converted the result of arctan again into degrees. Log in or register to post comments December 9, 2014 at 04:06 am - Permalink
December 8, 2014 at 04:01 am - Permalink
This gives me values from 2 to -2. I use wind direction values, thus values from 0 to 360, so this is not a reasonable result.
December 8, 2014 at 04:41 am - Permalink
Can you provide more explanation of what you need here please?
December 8, 2014 at 05:56 am - Permalink
December 8, 2014 at 06:13 am - Permalink
December 8, 2014 at 06:28 am - Permalink
Perhaps someone else can help?
December 8, 2014 at 06:31 am - Permalink
December 8, 2014 at 06:31 am - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
December 8, 2014 at 09:07 am - Permalink
December 9, 2014 at 01:48 am - Permalink
That will be -pi to pi.
Try scaling the result by 180/pi.
December 9, 2014 at 02:04 am - Permalink
DisplayHelpTopic "atan"
DisplayHelpTopic "atan2"
this says e.g. for atan2 that the input is expected to be in radians and the output values range from -pi to +pi.
December 9, 2014 at 02:05 am - Permalink
I converted degrees to radians before the calculations, and finally I converted the result of arctan again into degrees.
December 9, 2014 at 04:06 am - Permalink