-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Home > Community > FPScript > Script for Splitting the signal > Antwort auf: Script for Splitting the signal
To split a signal at a certain level (e.g. 0 in the question) one can use the FPScript functions ValuesAboveLevel() and ValuesBelowLevel(). In the available example a FPScript formula like
[ ValuesAboveLevel(Speed, 0, EVENT_SETVOID), \
ValuesBelowLevel(Speed, 0, EVENT_SETVOID) ]
creates a list with two named entries for the parts of the signal Speed ? 0 and ? 0. The parts have the same size as the original signal, the values not satisfying the condition are set to the floating point void value (? or NaN), as specified by the third argument EVENT_SETVOID. Other operations can be looked up in the Online Help (Index: ValuesAboveLevel (FPScript)).
One can achieve the same results by using the Event Isolation on the desired signal avoiding the need to write any FPScript code.