Trigonometric function
Keywords: main

Subsections

- Library
- Description
- Dialog Box
- Default properties
- Interfacing function
- Computational function (type 4)

##
Trigonometric function

### Library

Non_linear

### Description

The Trigonometric Function block performs numerous common trigonometric functions. You can select one of these functions from the Function list: sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, and tanh. The block output is the result of the operation of the function on the input or inputs.

### Dialog Box

Choose among sin, cos, tan, asin |
Function | sin

- Function: The trigonometric function.

### Default properties

- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- number/sizes of inputs: 1 / -1
- number/sizes of outputs: 1 / -1
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: no
- name of computational function: sin_blk

### Interfacing function

`scilab/macros/scicos_blocks/nonlinear/TrigFun.sci`

### Computational function (type 4)

    #include "scicos_block.h"
    #include <math.h>

    void sin_blk(scicos_block *block,int flag)
    {
      int j;
      if(flag==1){
        for (j=0;j<block->insz[0];j++) {
          block->outptr[0][j]=sin(block->inptr[0][j]);
        }
      }
    }