Filter for an 2D array of data, to obtained and defined range of data

I am generating data from a ultrasonic sensor at 1K Hz, and its a lot of data (data points range from 0-10). However, in some cases when I know data should be around 7 (for example) I get outliers (about 9 and around 10). Is there a way to set a filter to obtain data in defined range.
I will be average the data obtained to get a mean value, and the outliers are spoiling it. In worst case, my outliers are 30-40% of the data generated. I created a filter to sort the data and taking data starting from lowest value. I stop the loop when data hits a higher value then 9. But this seems to take a lot of time (since the loop checks for each data point and there are 1000s of them).
Is there a better way to filter this data and set a pre-defined range for array to be collected?
I am attaching my filter.vi.. and a sample data set from my previous run. The data ranges from 10 -8, and would like to have range set to 7.5 to 8.5 to be considered. The sensor is recording voltage here, and the problem can be solved in installing a different type of sensor, but a if a filter in LabView can due it, the sensor we are using now is absolute great.
I am in kind of emergency, my design in stalled due to this problem, if anyone can find sometime to share few suggestions, I will be grateful.
Thanks in advance.
Solved!
Go to Solution.
Attachments:
US filter.vi ‏14 KB
Ultrasonic raw data.xlsx ‏119 KB

See attached.  I embedded the data you posted into the vi.  It didn't seem like any data was less than 8.7 or so, so I modified the range so there would be some points to average.  Some sets were completely out of range so the mean came back as NaN (not a number) because of a divide by zero.
Randall Pursley
Attachments:
US Filter mod.vi ‏72 KB

Similar Messages

  • To create a Universe Level filter for calculating one month's data

    Post Author: roy999
    CA Forum: Deployment
    Hi Everbody, I am creating a Monthly report using Deski XI R2. My requirement is :At
    the report prompt the user will enter only the Start Date (which will
    be the first day of previous month) and the End Date will be
    automatically taken as the last day of the previous month. Is there any way to implement this, if yes please resond ASAP... ThanksRoy

    Post Author: amr_foci
    CA Forum: Deployment
    if you use oracle connection u can make it easy and use the oracle's functions like
    CALENDAR.MY_DATE BETWEEN @Prompt('ENTER DATE','D',,MONO,FREE) AND LAST_DAY(CALENDAR.MY_DATE)
    if u dont use oracle as a target database connection u can either look for the similar function in ur DBMS for "LAST_DAY" ,, i think its available for any DBMS
    good luck

  • Filter for One Dim should access all DIM's and another memebr from same Dim access part of another DIM

         Hi All,
    I want o merge below two conditions into single filter, anybody implimented as below,
         1. Dimension BUSINESS_UNIT member IDESCENDANTA(XXXX) users can see all departments for these BU(IDESCENDANTA(XXXX).
         2. Dimension BUSINESS_UNIT member  A , user can see only part of Department like IDESCENDANTS(DEPERTMENTXX) with this combination.
    these conditions i want in single filter, anybody had this type of requirement before, please give me your suggestions to impliment this.
      Thanks
    eSwar

    Hi,
    1. Yes , you need to create separate group for each filter.
    2. Yes, but it depends.
    (In this case filter 1 access which has access to all departments will overwrite/includes the filter 2 access which has access only to one department.)
    See below example for details
    Example:
    Filter_1:Access all products
    @idescendant("product"),@idescendant("market")","jun2013","loc",@idescendant("Account")
    Filter_2: Access only to one product and one market
    "Prod1","Inida","jun2013","loc", "usd" ,"cost"
    Case 1: If you include both the filters to one group then --> Filter_2 has access only to one product "prod1" but Filter_1 has access to all products. So Filter _1 access will overrides Filter_2 access .
    Case 2: Filter _1 has access only to LOC but Filter_2 has access to both LOC and USD. So including both the filters to one group provides access to both the currency.
    Hope this helps. If you still have any doubt let me know.
    Thanks

  • When can we expect a patch for Object Array List Data Provider?

    Hey JSC Team!
    When can we expect maybe, just maybe a minor patch for the Object Array List Data Provider loading class problem? Next Month? This Year? Next Year? Near Future? Long in the future? Sometime in the 22nd century?

    I think one of the problem is
    when u declare the ObjectListDataProvider in ur backing bean
    it doesnt appear in the design time straight away
    u have to clean build close and re open the project
    which is quite time consuming.

  • SSRS Bar Chart grouping date series into Months, setting scaler start and end ranges

    I've been trying to solve this issue for a few days now without writing a sql script to create a "blank" for all of missing data points so that I get a bar for each month.  I have date series (by day) data points grouped by two items
    that creates a set of bar charts.  EG:  one chart per product in the tablix detail grouped to site level.
    My issue is I would like the start and end of the charts to be the same for all charts and the only way I get it to work is with a chart that continues to show each date on the chart. 
    EG:
    I have the graph start and end points set and scaling by month as I would like but each bar is a day instead of aggregating to a month level.   My issue I hope to find a workaround for is if I go to Category Groups and define the grouping
    to group with a year and month function the series is no longer treated as date data and I cannot control scaling.  It works fine if all months have activity, but I can't figure out how to always have all charts start at "May 2012" in this example. 
    The only start and end point that I've been able to get to work once doing this are integer based, eg normal start would be 1 for each graph, but 1 doesn't equate to the same month from chart to chart.
    I hope SSRS can provide the solution.  I do know I can write a query that creates a ZERO value for each month/product/site but I don't want to leave the client with a query like that to support.
    -cybertosis

    Hi cybertosis,
    If I understand correctly, you want to display all month category label in the X-Axis. You have configure the Scalar Axis, however, it cannot display the requirement format.
    In your case, if we want the specific data format, we can configure Number property to set the corresponding Category data format. Please refer to the following steps:
    Right click the X-Axis, select Horizontal Axis Properties.
    Click Number in the left pane. Click Date option in the Category dialog box.
    Then, select Jan 2000 option.
    Please refer to the following screenshot below:
    If there are any misunderstanding, please feel free to let me know.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Retriggering Release strategy for PR with Document Type, Company Code and Price Range as Characaterstics

    Hi Friends,
    I have a issue to fix. The issue is releated to PR.
    There are some PR's in the system which has wrong release strategy picked up or wrong approvers picked up due to some congif change. now that the config changes are rectified correctly, we need to find a solution to correct the PR's which got affected due this.
    I have to retrigger the release strategy for all the affected PR's.
    The characterstics which we have consider for release strategy is Document Type, Company Code and Price Range.
    Can anyone suggest how can we retrigger the PR in bulk or individual to all the affected PR's, so that it picks up correct release strategy as per new config changes.
    Regards,
    Manjunath K

    Hi,
    Refer the discussion to triggers release again on release code addition/change in release strategy.
    release code is changed on PR release strategy - old PR can´t be approved
    Regards,
    Biju K

  • Interactive report filter for date not working correctly

    Hi,
    I am having an interactive report. I tried to give a filter for a column(created_on) as created on>29-oct-2009 17:17
    but i am getting the row containing created on as *29-oct-2009 17:17* in the report result. How can i correct this
    problem
    Thanks,
    TJ

    Hi,
    I think it is because seconds.
    So it is 29-oct-2009 17:17:00 and your record is e.g. 29-oct-2009 17:17:02
    br, Jari
    Edit
    You can use trunc function in your select so that it round date to minutes
    TRUNC(created_on,'MI') AS created_onBr, Jari
    Edited by: jarola on Nov 5, 2009 3:02 PM

  • How to create a data filter for BAPI used in a Distribution Model ?

    I am trying to create IDOC's for a QM inspection plan via message type QPMK in ECC 6.0. When creating the new message type in the Distribution Model, it forced me to use a BAPI (MasterInspectionChar) rather that just the message as I have done in the past. In order to ensure that only IDOC's related to a specific plant and material type get sent out, I was trying to create a filter.
    I am able to get into a 'Change Filter' dialog by double clicking 'No data filter set' under the node 'MasterInspectionChar.SaveReplica'. However, an attempt to highlight anything on this dialog and clicking button 'Create filter group' results in msg. 'Select node: Content-dependent parameter filtering'.
    Online help led me in a different direction, one thread led me to believe I needed to create a table entry for the filter in table TBD16 via BD81 for later attachment to the BAPI in the Distribution Model. Before this, I created two Z* ALE Object Type records for plant and material type in table TBD11 via BD95 for what I thought would provide a lookup back in BD81 for creation of a new filter record, but these objects are not found. Per the help, I am also unclear as to whether I would need to set up Receiver determination or Parameter filtering, nor where to make this step in the configuration happen?
    Can anyone point me back in the correct direction to get a data filter set up for this BAPI within the Distribution Model ?
    Thanks - Mike

    Just to clarify, what I am having trouble with is finding where exactly to plug in the name of the plant to be filtered? If using a message type such as MATMAS in a distribution model, it is very straight forward to navigate down from the 'Data filter active', and assign a value to whatever field you wish to filter via the 'List of Values'.  But in this example, message type QPMK required use of the BAPI MasterInspectionChar, and therefore the different method in creating the filter. 
    I cannot find similar functionality when navigating the BAPI related row, for MasterInspectionChar. The 'Change Filter' dialog popup displays a row for 'Container' and then 3 more rows containing 'BAPI structure...'.   Clicking the 'Attribute' checkbox on any of these rows sets 'Data filter active' as a node under the BAPI.  Double clicking the 'Data filter active' brings me back into the same dialog, and selecting any row with an attempt at this point to create a filter results in the 'Select node: content-dependent parameter filtering' warning.  Is this warning occuring because of missing configuration?
    Thanks - Mike

  • Parsing Issue in Filter For Date Format

    Hi Folks,
    I am having Parsing Issue on "Key Date" Object in Universe. See the Error and Code below for your review
    Error: Parse Failed: Exception: DBD, The value entered is not valid. It must adhere to one of the following formats.
    YYYYMMDD
    DD.MM.YYYYState:N/A
    Code:
    <OPERATOR VALUE="AND"><OPTIONAL><FILTER KEY="0I_DAYIN"><CONDITION OPERATORCONDITION="Between"><CONSTANT TECH_NAME="@Prompt('Day Interval From','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/><CONSTANT TECH_NAME="@Prompt('Day Interval To','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/></CONDITION></FILTER></OPTIONAL><FILTER KEY="0P_KEYDA"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Key Date','D',,mono,free)"/></CONDITION></FILTER></OPERATOR>
    This universe is created by someone else and client need to modify it with a calendar but i did not modify it yet however its already giving me the hard time. Kindly advise, any kind of help will be appreciated
    Thanks

    Hi,
    With the information provided I cannot for sure get to the error but here is what I would check.
    Firstly, I was wondering if the 5th parameter in the @Prompt can be Primary_Key. I thought it would be either free or constrained.
    Secondly, please the LOV values for the @ prompt are being populated from 'Calendar Day\LovDay IntervalBase'. So I would check the date format being used there.
    Third, the To and From dates are alphaneumeric and not dates, so I am not sure how the comparision would happen.
    Hope this helps.
    Regards,
    Madhur

  • IDOC: Problem with data filter for IDOC extension field

    Hallo!
    I've created an idoc extension for the basic type DEBMAS06 that works fine. Now I want to use a data filter for one field ( company code ) of my segment. Every segment with a company code different from 100 should be filtered and not send to the other client. But what happend is that for all customers that have at least one company code different from 100, all segments including the one with cc 100 were deleted and a error "Segment ... does not exist for message type DEBMAS" appeared on the screen.
    Does anyone have any ideas about this problem?

    Not sure about changes to be made at the filtering options.
    An alternative would be sending the data to XI as it is and perform the mapping to remove the unnecessary segments.
    Disadvantage: Unnecessary processing of segment would be done at XI.
    Advantage: The integration logic would be completely handled by XI.
    Regards,
    Prateek

  • InfoView - Query Filter for date variable of previous week

    I am trying to automate the process to generate a report for the previous week's data.  Right now I just prompt the user to enter in the start & end date/times, but I would like to somehow automate the date filtering using a Query Filter.
    In particular, the report will be generated every Thursday at 12:35 PM, and it needs to filter only the date field between the date's of the previous Thursday @ 1:31 PM, and the current Thursday @ 12:30 PM.
    I know there is a way to do this using an offset or something like that, but I'm a bit of a newbie to InfoView....so any help is greatly appreciated.  Sorry if the explanation is confusing.
    Thanks so much,
    Nick

    Hi,
    You can create two objects on universe level or first database level then add in the universe based the sysdate.
    Then go to  webi  query and  replace the prompt value by these objects and from next time when ever user refresh this report will run  without any prompt.Same thing in the scheduled report.
    Thanks,
    Amit

  • Use date as filter for rebatching in fsisys.ini - Documaker Server 11.1

    Hello,
    I am attempting to create a filter for my batch in fsisys.ini (Documaker Server 11.1). I would like to use a date, however, it is not working. Is it possible?
    Here is what I entered:
    Rebatch    = BatchName(sdbib)    If((TranType = "BILL" and COMPANY_NAME ="XYZ INSURANCE COMPANY") or (TranType = "Bill" and COMPANY_NAME = "ABC INSURANCE COMPANY" and POLICY_EFF_DATE >='11/01/2013'))
    The output goes into the default batch instead of the one I want (sdbib). Of course when I remove the date it goes into the correct batch.

    I suspect that the problem is with the date comparison. If this is DAL scripting, as it appears, then you are comparing a string to a string. so 11/01/2013 would appear greater than 01/01/2014, because the first character '1' is greater than the first character of the second string '0'.
    You either need to normalize your dates to be in YYYYMMDD format or use a DAL function like DiffDate() to determine that the one date is greater than the other.
    ... AND DIFFDATE( "11/01/2013",1, POLICY_EFF_DATE,1) >= 0 )
    I believe this would tell you that your policy date is greater than the constant date you have as the first parameter. Zero would mean the dates are the same.
    Normalizing the dates first would mean that you would do this.
    First convert your date to be type 4 which is YYYYMMDD. MM/DD/YYYY is considered type 1, so you are converting from 1 to 4.
    yDate = Date2Date(Policy_Eff_Date, 1, 4);
    This then allows the compare of the constant date written in the same fashion.
    .... AND yDate >= "20131101" ) )

  • IIR filter for multiple ATD data

    I have 3 ATDs simultaneously sampling. The digital IIR filter works on the first board data of 16 waveforms. The second and the third ATD data do not get filtered at all. They just output zero for all the channels. I tried different instances of the IIR filter to be used with different ATD data and the result is the same. If I turn off the digital filter, then the data shows up correctly.
    Please help.
    Thanks,
    Narayana

    Hello Nadim,
    Thank you for replying. In fact I just came from the lab after solving the problem. Yes, it is an analog-to-digital board - with 16 inputs. All these boards are tied together with respect to sampling-using a synchronization cable. the ATD board is what NI used to call PCI-MI0-16E-4. During my troubleshooting, I realized that the data coming from the first board has a t0 and dt value in the waveform attributes. The other two boards did not have these two attributes - they were zero. Once I gave the waveforms the proper dt and t0 value, the IIR filter could operate on the waveforms. So the problem was solved.
    But thank you for replying. If I did not make myself clear above, I can post an image of the code.
    Thank you,
    naroowal

  • Is there an easy way to filter a 2-d array based on the values of two of the fields?

    Is there an easy way to filter a 2-d array based on the values of one of the fields. In my attached VI the output array has the following format:
    TimeStamp        Ident                Frame Type          Bytes    Data
    10:57:07.621   3AD00016   CAN Data Frame   8          0000000000000000
    10:57:07.622   3AD00017   CAN Data Frame   8          000005E000000000
    10:57:07.624   3AD00018   CAN Data Frame   8          0000000003300000
    10:57:07.625   2DC00000   CAN Data Frame   8          0000000000000000
    10:57:07.626   3AD00019   CAN Data Frame    4         0000030000000000
    I would like to delete any rows that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the above data the fourth row would be deleted. The only way I can see to do it is to form a 1-d array. Is there a better approach?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    CMM_SN_MULTI.vi ‏20 KB

    Hi chuck72352,
    after you have sorted your data, you can use the InRange Function. Combined with a "search 1D Array" you'll get the range you really want.
    Mike
    Attachments:
    ArraySubset.PNG ‏25 KB

  • Work around for Excel's array formulae?

    I have an Excel spreadsheet which I have built over many years to manage maintenance tasks of my boat. I would like to convert this to run on Numbers. Unfortunately I can't find a work-around for Excel's "Array Formulas".
    The column headers of my spreadsheet contain maintenance tasks (plus data on how frequently by days or engine hours these jobs need to done). When I complete a maintenance task, I log the date and engine hours in a new row with an "x" to signify that the job is done. Excel then looks up the date/engine hours when each job was last done (ie the lowest "x") and then uses conditional formatting to highlight the column headers of which jobs are overdue. Is there a work around for this in Numbers?
    I attach an image shot of my Excel spreadsheet which may help:

    Hi Rich,
    Some made-up dates.
    If you have multiple x's in a column, change all but the most recent to "Done" or something other than x This approach looks for the date in Column A that matches a single x in a task column.
    This example works on years. I hope you change your oil and filter more often .
    One Header Row and four Footer Rows. Enter Years between services (D9) from the keyboard.
    To find the date of the last service (the only x in Column D)
    D10 contains this formula:
    =INDEX($A,MATCH("x",D,0))
    You can Fill Right to other columns.
    "Years since" (D11) contains this formula:
    =YEAR(TODAY())-YEAR(D10)
    "Alert" (D12) contains this formula:
    =IF(D11>D9,"Hey, You!", "OK")
    Conditional Formatting in D12 sets the text to red if it equals "Hey, You!"
    It would be best to combine these steps into one complex formula. Numbers is slowed down with each Header or Footer in a Table.
    Regards,
    Ian.

Maybe you are looking for