DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

VBS coding problem

Hello,
 
I have a big (maybe small for you) problem with coding using a VBS script inside DIAdem. I was able to write and run most of the code until I had to calculate the inverse cosinus and inverse tangent of something. Basically I have a channel and I want to take the inverse cosinus of this channel and save it onto the next one. The code that I wrote is below:
 
Call Formulacalc("Ch(12):=acos(Ch(11))")
 
When I run the script, it gives an error saying that there is a wrong argument. In short, how can I take the inverse cosinus of a channel?
I would be grateful if somebody can help me.
 
Cihan
0 Kudos
Message 1 of 2
(3,433 Views)
Hi c_akdogan,

The inverse cosinus is defined in a range from -1 to 1. Maybe your values are out of this range.
Information from the DIAdem help

Function: ArcCos

Valid names: ArcCos, ACos

Calculates the arc cosine of a number.

Syntax

ArcCos(Value)

Parameters

Value Specifies a numeric value, a variable, or a data channel that contains the cosine values.
Value range from -1 to +1.

Result

Returns an angle in radians from 0 to Pi.


Greetings
Walter
0 Kudos
Message 2 of 2
(3,425 Views)