Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Xcos > palettes > Sources palette > SAWTOOTH_f

SAWTOOTH_f

Sawtooth generator

Block Screenshot

Description

This block is a sawtooth wave generator. The output of the block is described by the equation:

s\left(t\right)=\begin{cases}0 & \textrm{ for }t=t_{i}\\t-t_{i} & \textrm{ for }t_{i}\leq t<t_{i+1}\end{cases}

At first event on its activation input, the output increases linearly from 0 with a unitary rate. When the following event occurs, the output goes to 0 and begin again to increase until the next event and so on.

The resulting amplitude of the output is equal to the period of event signal. If you want more control on the amplitude or a negative rate, use the Sigbuilder or Curve_f blocks.

Data types

  • Output: scalar double.

Default properties

  • always active: yes

  • direct-feedthrough: no

  • zero-crossing: no

  • mode: no

  • regular outputs:

    - port 1 : size [1,1] / type 1

  • number/sizes of activation inputs: 1

  • number/sizes of activation outputs: 0

  • continuous-time state: no

  • discrete-time state: yes

  • object discrete-time state: no

  • name of computational function: sawtth

Example

This diagram shows the output of the SAWTOOTH_f block with an event period of 2 seconds and an offset of 1 second on event generation.

Interfacing function

  • SCI/modules/scicos_blocks/macros/Sources/SAWTOOTH_f.sci

Computational function

  • SCI/modules/scicos_blocks/src/fortran/sawtth.f (Type 0)

See also

Report an issue
<< RFILE_f Sources palette STEP_FUNCTION >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:23:41 CET 2022