Forum FlexPro – Discuss your topic!

Datensatz filtern

Accueil > Community > General > Datensatz filtern

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12635
    Christian RathgeberChristian Rathgeber
    Participant

    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)

    #8298
    Christian RathgeberChristian Rathgeber
    Participant

    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)

    #9028
    Bernhard KantzBernhard Kantz
    Participant

    In this case you can use the FPScript-function Reduce. It reduces the number of values in a data set.

    Example:

    Reduce(DataSet, 10)

    support@weisang.com

    #9029

    Hallo,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:

    
    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
    ......

    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!

    #9030
    Bernhard KantzBernhard Kantz
    Participant

    You 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:

    
    'Column3' + 'Column4'
    

    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 complement

    You can reuse these analysis objects for different measurements using the (De)active Folder command.

    Please see also
    FlexPro Help
    Creating Templates for Analysis
    Text Data Import Wizard

    support@weisang.com

    #9031

    Vielen 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:

    
    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
    

    Nachher:

    
    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
    

    Ich hatte mich vorher wohl leider nicht exakt ausgedrückt.

    #9032
    Bernhard KantzBernhard Kantz
    Participant

    Use the result Indices of the values instead of Extract values 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]

    support@weisang.com

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.