Topic
Datensatz filtern
- This topic has 6 replies and 3 voices and was last updated 18 years ago ago by Christian Rathgeber.
-
AuthorPosts
-
04.05.2007 at 17:22 #34012Christian RathgeberParticipant
Is it somehow possible to filter a Datensatz so that only every tenth element of it will be left?
Ist es möglich einen Datensatz so zu filtern dass nur noch jedes 10. Element übrig bleibt?
(Ich hab nämlich ungefähr 10 mal soviele Werte im Zeitstempeldatensatz wie in einem anderen und um sie graphisch darzustellen muss der Datensatz gefiltert werden)04.05.2007 at 17:22 #34018Christian RathgeberParticipantIs it somehow possible to filter a Datensatz so that only every tenth element of it will be left?
Ist es möglich einen Datensatz so zu filtern dass nur noch jedes 10. Element übrig bleibt?
(Ich hab nämlich ungefähr 10 mal soviele Werte im Zeitstempeldatensatz wie in einem anderen und um sie graphisch darzustellen muss der Datensatz gefiltert werden)04.05.2007 at 18:11 #34013Bernhard KantzParticipantIn this case you can use the FPScript-function [b]Reduce[/b]. It reduces the number of values in a data set.
Example:
[code]Reduce(DataSet, 10)[/code]18.07.2008 at 04:49 #34014Stefan Schreiter@gmx.deParticipantHallo,ich bin noch ein Neueinsteiger bei Flexpro und habe ein ähnliches Problem:
Ich möchte einen Auto-Import-Filter schreiben um eine .txt-Datei einzulesen. Die Messdaten haben folgende Struktur:
[code]
Ident
Location
Serial No
Sample Rate
Store Rate 2
Code TimeDate Pgessamt Last 1
1 12.06.2008 10:10:00 0,0 0,0
1 16.08.2008 10:10:02 0,0 0,0
1 14.09.2008 10:16:04 2,0 5,0
1 14.07.2008 10:15:06 80,0 5,0
……[/code]Hierbei sollen nur die Daten ab Zeile 7 importiert werden. Weiterhin müssen die Zeilen/Datensätze entfernt werden, bei denen die Summe der Messwerte (Spalte 3 und 4) Null ergibt.
Da ich noch nicht viel mit VBA usw. gearbeitet habe wäre ich für jegliche Lösungsansätze/Prozedur dankbar!
21.07.2008 at 19:37 #34015Bernhard KantzParticipantYou don’t need a VBA macro to realize these steps:
1) Use the text data import wizard and save your settings as new file type.
2) Create a FPScript formula which calculates the sum of column 3 and column 4:
[code]
‘Column3’ + ‘Column4’
[/code]
3) Use the event isolation analysis object to remove the values:
– Event: Values in interval
– Lower border: 0
– Upper border: 0
– Result: Extract values + Form complementYou can reuse these analysis objects for different measurements using the [b](De)active Folder[/b] command.
Please see also
FlexPro Help
Creating Templates for Analysis
Text Data Import Wizard22.07.2008 at 06:15 #34016Stefan Schreiter@gmx.deParticipantVielen Dank für Ihre Antwort.
Mit dieser Möglichkeit werden leider nur die Nullen entfernt in der gebildeten Summenformel.
Es sollen allerdings in den originalen Messwerten der Spalte 3 und 4 die Zeilen entfernt werden,in denen in “beiden” Spalten eine 0 steht.Vorher:
[code]
Ident
Location
Serial No
Sample Rate
Store Rate 2
Code TimeDate Pgessamt Last 1
1 12.06.2008 10:10:00 0,0 0,0
1 16.08.2008 10:10:02 0,0 0,0
1 14.09.2008 10:16:04 2,0 5,0
1 14.07.2008 10:15:06 80,0 5,0
[/code]Nachher:
[code]
Code TimeDate Pgessamt Last 1
1 14.09.2008 10:16:04 2,0 5,0
1 14.07.2008 10:15:06 80,0 5,0
[/code]Ich hatte mich vorher wohl leider nicht exakt ausgedrückt.
22.07.2008 at 22:49 #34017Bernhard KantzParticipantUse the result [b]Indices of the values[/b] instead of [b]Extract values[/b] in the Event Isolation analysis object.
After that you can use the index operator in a new FPScript formula. The index operator can extract individual values or sections from data series, data matrices, signals, signal series and space curves.Formula 1:
Column1[EventIsolation]Formula 2:
Column2[EventIsolation] -
AuthorPosts
- You must be logged in to reply to this topic.