-
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 > Equal To Operator > Antwort auf: Equal To Operator
You can do this computation much more efficiently if you use the index operator and event isolation functionality to avoid loops on individual values:
Dim idx
// setup data series of proer length
Dim Turbinendrehzahl = 0. # NumberOfRows(Vges)
// Find all positions where 1st gear was used
idx = ValuesInInterval(Gangpos, 1, 1, EVENT_INDEX)
// set all these postions to a fixed value
Turbinendrehzahl[idx] = Radwellendrehzahl / 'Gang 1'
// do the same for the 2nd gear.
idx = ValuesInInterval(Gangpos, 2, 2, EVENT_INDEX)
Turbinendrehzahl[idx] = Radwellendrehzahl / 'Gang 2'
// continue for further gears
// would "Radwellendrehzahl" and "Gang x" be data series, you could have a loop running across the gears.
...
// return the result
return Turbinendrehzahl