-
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
Dataset with wrong x-Axis
- Dieses Thema hat 1 Antwort sowie 2 Teilnehmer und wurde zuletzt vor vor 4 Jahren von Bernhard Kantz aktualisiert.
-
AutorBeiträge
-
November 30, 2020 um 3:53 pm Uhr #28485Leon DTeilnehmer
Hello,
I have a signal that has a wrong x-axis. The time intervall between two maximas should be the same, but it isn`t.
To correct this, i tried to use given fpscript formulas and manipulated them. My Idea is to extract maxima, delete x-values in between two maxima and replace the x-values at the maxima with the x-value at the maxima before plus a fixed time intervall. (x_before + 50000s)
The codes are modified fpscript codes from event isolation. I added the_X variable and swapped some things.
This code is supposed to delete all x-values between to maxima and replace the x-value at the maxima with the x-value at the maxima before + 50000s. The deleting of x-values in between works fine, but i have no idea how to replace the maximum values with an ascending value.
Dim _EventResult, _Sig, _Max, _Y, _Event, _X _Y = FloatingPoint64 SourceData.Y _X = FloatingPoint64 SourceData.X _Sig = '2_Temp_Thermistor' _Max = Maximum(_Sig) If DataStructure(_Max) >= STRUCT_DATASERIES Then _Max = Maximum(_Max) End _Event = Extrema(_Sig, 0.01000000000000000 * _Max, EVENT_POSITIVE, EVENT_INDEX) _X[IndexNot(_Event, NumberOfRows(_X))] = ? If DataStructure(SourceData) <= STRUCT_DATAMATRIX Then _EventResult = _Y Else _EventResult = Signal(SourceData.Y, _X, SourceData.Z) End End
Interpolating afterwards works also fine.
Thanks in advance!
Dezember 1, 2020 um 9:34 am Uhr #28489Bernhard KantzTeilnehmerThe _Event variable contains a dataset with the indices of the local maximas. Thus _Event[0] marks the first, _Event[1] the second one. Thus
_X[_Event[1]] = _X[_Event[0]] + 50000 s
should do the trick.
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.