Campbell-scientific CR9000X Measurement and Control System Instrukcja Użytkownika Strona 297

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 442
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 296
Section 8. Processing and Math Instructions
Remarks
Source can be any valid numeric expression measured in radians.
The COS function takes an angle and returns the ratio of two sides of a right
triangle. The ratio is the length of the side adjacent to the angle divided by the
length of the hypotenuse. The result lies in the range -1 to 1.
If it is desired to use
degrees instead of radians for the inputs and results of the trig functions in a
program, the "AngleDegrees" declaration instruction can be used.
To convert degrees to radians, multiply degrees by
π/180. To convert radians to
degrees, multiply radians by 180/
π. π is approximately 3.141593.
COS Function Example: The example uses COS to calculate the cosine of an angle
with a user-specified number of degrees.
Dim Degrees, Pi, Radians, Ans 'Declare variables.
BeginProg
Pi = 4 * Atn(1) 'Calculate π.
Degrees = Volts(1) 'Get value to convert.
Radians = Degrees * (Pi / 180) 'Convert to radians.
Ans = COS(Radians) ‘The Cosine of Degrees.
EndProg
CosH (Source)
The COSH function returns the hyperbolic cosine of an expression or value.
Syntax
return = COSH (X)
Remarks
The COSH function takes a value and returns the hyperbolic cosine [COSH(x)
= 0.5(e
x
+ e
-x
)] for that value.
COSH Function Example
The example uses COSH to calculate the hyperbolic cosine of a voltage input
and store the result in the Ans variable.
Public Volt1, Ans 'Declare variables.
BeginProg
Scan (1,Sec,3,0)
VoltDiff (Volt1,1,mV5000,1,True ,200,500,1.0,0)
Ans = COSH( Volt1 )
NextScan
EndProg
CovSpa(Dest,NumofCov, Size,CoreArray,DataArray)
The CovSpa instruction computes the covariance(s) of sets of data that are
loaded into arrays.
Syntax
CovSpa(Dest, NumOfCov, SizeOfSets, CoreArray, DataArray)
8-11
Przeglądanie stron 296
1 2 ... 292 293 294 295 296 297 298 299 300 301 302 ... 441 442

Komentarze do niniejszej Instrukcji

Brak uwag