SIN/de

(Difference between revisions)
Jump to: navigation, search
(See Also)
(Example)
Line 50: Line 50:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Example</span> =
+
= <span class="f_Header">Beispiel</span> =
  
 
<br/><source lang="bascomavr">
 
<br/><source lang="bascomavr">
$regfile = "m48def.dat" ' specify the used micro
+
$regfile = "m48def.dat" ' Verwendeter Mikrocontroller
$crystal = 8000000 ' used crystal frequency
+
$crystal = 8000000 ' Taktfrequenz
$baud = 19200 ' use baud rate
+
$baud = 19200 ' Baudrate
 
$hwstack = 32 ' default use 32 for the hardware stack
 
$hwstack = 32 ' default use 32 for the hardware stack
 
$swstack = 10 ' default use 10 for the SW stack
 
$swstack = 10 ' default use 10 for the SW stack

Revision as of 01:44, 1 March 2013

Contents

Funktion

Gibt den Sinuswert einer Gleitkommazahl zurück.

 

 

Syntax

var = SIN( source )

 

 

Remarks

Var

A numeric variable that is assigned with sinus of variable source.

source

The single or double variable to get the sinus of.

 

All trig functions work with radians. Use deg2rad and rad2deg to convert between radians and angles.

 

 

Siehe auch

RAD2DEG , DEG2RAD , ATN , COS

 

 

Beispiel


$regfile = "m48def.dat" ' Verwendeter Mikrocontroller
$crystal = 8000000 ' Taktfrequenz
$baud = 19200 ' Baudrate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
 
 
Dim S As Single , X As Single
S = 0.5 : X = Tan(s) : Print X ' prints 0.546302195
S = 0.5 : X = Sin(s) : Print X ' prints 0.479419108
S = 0.5 : X = Cos(s) : Print X ' prints 0.877588389
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language