Setting a Threshold Array

Hello,
I've looked and looked on how to do this in on the forums but no luck.
I'm working with larger data sets. The code below is a simplified version of what I'm trying to do.
I have a 2D array that gets converted into a 1D array to make taking the average easier.
I want to create a new 1D array whose elements are above a threshold that I define. The size of this new array may be smaller. Every time I try to eliminate the elements below the threshold for those values below the threshold, a zero is put into the new array. This will effect the average.
Can someone help. As I just want the values below the threshold and no zeros.
Cheers.

Solved!
Go to Solution.
Attachments:
2D Array to 1D array.vi ‏19 KB

It is time to call in the bucket brigade.  See the example.
Attachments:
2D Array to 1D array_Bucket.vi ‏14 KB

Similar Messages

  • Issues on setting the SQL ARRAY in Weblogic 10.3

    Hello,
    I am facing problem while migrating my application from Weblogic 8.1 to Weblogic 10, and problem is on setting the database ARRAY.
    here is the brief of the problem which we are facing during weblogic upgrade, appreciate if someone could help us in this regard.
    Requirement:- Upgrading the Weblogic Server from 8.1 SP4 to 10.3.
    Problem Description :- We are facing issue with Weblogic server 10.3 related to JDBC call for setting the Database Array. We are using Spring framework JDBC templates.
    In 8.1 we used to send the database Array by using two different methods mentioned below.
    Method 1 :- First method which we are using to set the ARRAY object to database.
    CODE:
    public Object doBaseInConnection(Connection connection) throws SQLException
    OracleCallableStatement callableStatement = OracleCallableStatement)connection.prepareCall(DBUtils.createPreparedStatementFunctionString("bbvoice_customer_discovery_ng", "validate_password_3", 8));
    callableStatement.registerOutParameter(1, Types.INTEGER);
    callableStatement.setString(2, identifier);
    callableStatement.setString(3, password);
    ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("TACTOSS.PRODUCT_NAME_ARRAY", connection);
    ARRAY ocbsArray = new ARRAY(arrayDesc, connection, productSearchList); -- Exception in this LINE
    callableStatement.setARRAY(4, ocbsArray);
    callableStatement.execute();
    EXCEPTION:
    This was working fine in Weblogic8.1 where as giving the below exception in Weblogic 10.3.
    java.lang.ClassCastException: $Proxy439 cannot be cast to oracle.jdbc.OracleConnection
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:155)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:123)
    CHANGE:
    Only change in Weblogic 10.3 in this area is earlier in weblogic 8.1 we used to have ojdbc14.jar but weblogic10.3 is having ojdbc6.jar.
    Method 2 :- Second method which we are using to set the ARRAY object to database.
    CODE:
    public Object doBaseInConnection(Connection connection) throws SQLException
    OracleConnection oracleConnection = (OracleConnection) ((WLConnection)connection).getVendorConnection();  -- Exception in this LINE
    OracleCallableStatement callableStatement = (OracleCallableStatement)connection.prepareCall(DBUtils.createPreparedStatementFunctionString("bbvoice_business_bbv_ng", "create_service_3_mb", 15));
    callableStatement.registerOutParameter(1, Types.INTEGER);
    callableStatement.setBigDecimal(2, new BigDecimal(customerId.intValue()));
    callableStatement.setString(3,businessBBVDTONG.getCpeType() );
    ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor( "TACTOSS.GEO_DETAILS_ARRAY", oracleConnection);
    List geoList = businessBBVDTONG.getGeoNumberList();
    int size = geoList.size();
    Object arrayValues[][] = new Object[size][];
    Object[] str = new Object[3];
    for(int i=0;i<geoList.size();i++)
         GeoNumberDTO geoNumberDetails = (GeoNumberDTO)geoList.get(i);
         str[0]=geoNumberDetails.getDirectoryEntry();
         str[1]=geoNumberDetails.getCssDistrictId();
         str[2]=geoNumberDetails.getCssExchangeGroupCode();
         arrayValues[i] = str;
         str = new Object[3];
    ARRAY ocbsArray = new ARRAY(arrayDesc, oracleConnection, arrayValues);
    callableStatement.setARRAY(4, ocbsArray);
    callableStatement.execute();
    EXCEPTION:
    This was also working fine in Weblogic8.1 where as giving the below exception in Weblogic 10.3.
    java.lang.ClassCastException: $Proxy216 cannot be cast to weblogic.jdbc.extensions.WLConnection
    at com.bt.bbv.core.dao.bbvoice.nextgen.BusinessBBVDAONGImplDB$2createService.doBaseInConnection(BusinessBBVDAONGImplDB.
    java:171)
    at com.bt.bbv.core.util.BaseConnectionCallback.doInConnection(BaseConnectionCallback.java:38)
    CHANGE:
    Changes from Weblogic 8.1 to 10.3 are
    1) We are not having the WLConnection in weblogic.jar instead it is present in com.bea.core.datasource6_1.4.0.0.jar
    2)Weblogic 10.3 server is having ojdbc6.jar instead of ojdbc14.jar.

    You'll also need to map the security role defined in web.xml to a Weblogic principal (an actual Weblogic user or a group) in weblogic.xml.
    Example:
    web.xml
    <web-resource-collection>
    <web-resource-name>PowerPointTemplates.jws</web-resource-name>
    <description>A web service secured by SSL and basic authentication</description>
    <url-pattern>/PowerPointTemplates.jws/*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>Friends</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <login-config>
    <auth-method>CLIENT-CERT</auth-method>
    <realm-name>myrealm</realm-name>
    </login-config>
    <security-role>
    <description>Role description</description>
    <role-name>Friends</role-name>
    </security-role>
    weblogic.xml
    <security-role-assignment>
    <role-name>Friends</role-name>
    <principal-name>weblogic</principal-name> <!-- the following 3 are users that exist in Weblogic -->
    <principal-name>user1</principal-name>
    <principal-name>user2</principal-name>
    <principal-name>Turbo_Users</principal-name> <!-- this is a Weblogic group -->
    </security-role-assignment>

  • Configuration of FP-Modules. In the catalog is something written about sending data on data change. There is a checkbox in the FP-Explorer but I can�t find a configuration menu in FP-Explorer to set the threshold value at which the data will be send.

    Configuration of FP-Modules. In the catalog is something written about sending data on data change. There is a checkbox in the FP-Explorer but I can�t find a configuration menu in FP-Explorer to set the threshold value at which the data will be send.

    : Configuration of FP-Modules. In the catalog is something written about sending data on data change. There is a checkbox in the FP-Explorer but I can�t find a configuration menu in FP-Explorer to set the threshold value at which the data will be send.The FP-1600 modules automatically send data on-change only. The change threshold is by default 0%. Any change, even a single least significant bit change, is sent back to the computer. If the FP-1600 firmware revision supports deadbanding (firmware revision 3.0.x and later, can be downloaded from ftp://ftp.ni.com/support/fieldpoint/Update/FPEthernet0320.zip ). Then on each analog channel or count channel you can specify a percentage change for deadbanding in FieldPoint Explorer. This is done on a channel by channel basis, by right-clicking on the particular IO module and choosing Edit this Device, then choosing Channel Configuration. Each channel (if it supports deadbanding) will have a deadband entry box on the middle right side of the screen).
    The FP-1000/1001 seri
    al network modules do not support deadbanding. The checkbox in FieldPoint Explorer is simply for how FieldPoint Explorer displays the data to the user and does not effect client programs nor the behavior of the network module itself.
    Regards,
    Aaron

  • Set metric threshold for default metrics

    Running Grid Control 10.2.0.4; have not had the time to go through an upgrade to 10.2.0.5 yet.
    There are several metrics I am interested in setting a threshold for, specifically the Streams Replication metrics. When I click the "All Metrics" link on the cluster database's homepage I see a category called Streams Process Count as well as several metrics within that group. Right now none of those metrics have thresholds set. I have tried adding a threshold in the monitoring config (Preferences -> Rules -> Database availability and critical states) but the Streams metrics do not appear.
    Am I missing something here? I feel kind of ridiculous for asking, but I can't seem to find the answer anywhere...

    Not every metric in 'all metrics' is configurable with metric thresholds.
    Your workaround is to write an user definied metric.

  • How to set alert threshold and email alerts?

    Hi!
    I have configured Solution manager 3.2 to monitor
    our R/3 systems.
    I want to be able to set the threshold for  tablespace
    usage and be able to send an email if the usage
    of the tablespace is 80% full.
    Could anybody tell how to implement it?
    Thanks!

    Hi Christy:
    There are different approaches to configure alerts, if you are using Solution Manager; I think you can benefit if you choose SolMan and the Central System (CEN) to handle all the monitoring and email alerting.
    If this is the case, you will need to install the CCMS Agents on every satellite system in order to trigger remote alerts.
    Let me know what is your idea and I can follow with you with the required steps.
    Best Regards,
    Federico G. Babelis
    NetWeaver Certified Consultant
    GAZUM Technologies S.A.
    Consulting Services and Software Solutions
    http://www.gazum.com
    ...download FREE Marketplace Manager at: http://www.gazum.com/products

  • How to combine 3 or more set of 2D array to make a 3D array

    Hi all,
    I have few sets of 2D array , I want them to group together in a 3D array so each 2D array will be in a different page. Is there a way to do that. I tried reshape array but was not successfull since my understanding of handling array is less. Can you please help me out.(example data is attached)
    Thanks,
    Ankit G
    Solved!
    Go to Solution.
    Attachments:
    2D data.vi ‏11 KB

    Build Array should do what you want.
    Note that I changed the value of the first element in arrays 2 and 3 so you can tell where the data on different pages in appended array came from.
    Lynn
    Attachments:
    2D data.2.vi ‏9 KB

  • Different values for threshold array?

    Hi, I am collecting measurements from 8 fluxmeters in an array of 8 elements and graph them in a multi line chart.
    The fact is that some measurements return bad values due to bad transmission or bad reading from the (OLD) instrument. So, those wrong values are under or above the 50% of the real value (or the same, of the setpoint value).
    Only a wrong value between 2 good values is collected (only a peak at time), so my goal will be:
    if a > or < 50% of the real value (or the setpoint) is collected and both the value before and the value after this wrong reading are good I would replace the wrong with a correct value (say: with the previous or with the setpoint) in order to have a smooth chart shape.
    I started to use threshold array vi but I need different threshold values for all 8 array positions because all 8 fluxmeters could have different setpoints.
    Not able to solve...and probably I will need to collect at minimum 3 readings before filter wrong values, so I suppose I'd have to fill a 8x3 matrix (?)...

    I don't think that the threshold array primitive is the right choice.  This function interpolates the array and finds the fractional index.  It assumes that the data has a slope.  It doesn't sound like your data would meet this criteria.
    You just need to find the "bad" data points and replace the value with a reasonable value.  (maybe the average of the two data points on either side)
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • I can't find the option on my w520 where I set the threshold (96%) to start charging my batter

    I've looked through all the settings and can't find that option anymore. I know it is working because I'm plugged in and I see 98% and it's not going up. I often move my computer around and unplog and plug a lot so I want to set that threshold to 90%.
    Solved!
    Go to Solution.

    It's in Power Manager. Click Advanced, and go to the Battery tab. You'll see the Battery Maintenance button there.
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

  • 3750 - mls qos queue-set output threshold

    In the IOS command, http://www.cisco.com/en/US/docs/switches/lan/catalyst3750/software/release/12.2_44_se/command/reference/cli1.html#wp2144505. The drop-threshold1 and 2 is in the range from 1 3200%. Can somebody elaborate on the 3200%. How do they determine that number and what that number means to my threshold? Thanks

    The drop threshold should be lower than the shutdown threshold (if configured) and should be based on the maximum
    amount of PDUs you expect to receive on a port and on the CPU utilization during peaks hours. These values usually determine what is a normal peak condition and therefore what could be an abnormal peak condition. Then you can set the threshold between the two to avoid excessive spikes of PDUs on a port

  • How can set a var array for tabs?

    Hi eveyone,
    Is that possible to set a var array for tabs
    for instances:
    var oneTab = RegExp(“(.+)\\r”)
    var twoTab = RegExp(“(.+)\\t(.+)\\r”)
    var threeTab = RegExp(“(.+)\\t(.+)\\t(.+)\\r”)
    var fourTab = RegExp(“(.+)\\t(.+)\\t(.+)\\t(.+)\\r”)
    var firstCol = RegExp(“(.+)”)
    var firstTwo = RegExp(“(.+)\\t(.+)”)
    if
    null + oneTab or twoTab or threeTab or fourTab
    insert two tab before
    if
    firstCol + tab + oneTab or twoTab or threeTab or fourTab
    change to firstCol + tab + tab + oneTab or twoTab or threeTab or fourTab
    if
    firstTwo + oneTab or twoTab or threeTab or fourTab
    remain the same
    How can I do that?
    BEFORE CHANGE:
    AFTER CHANGE:
    thanks
    John

    Hi,
    or I can change idea into this:
    \\================================================
    var firstCol = RegExp("~m*~_? ?([\\u\\l]).+?\\t")
    var mediumCol = RegExp("(.+)\\t")
    var lastCol = RegExp("(.+)|((.+)\\t)+(.)")
    if null + lastCol
    change to: RegExp("\\t\\t") + lastCol
    if firstCol + lastCol
    change to: first + RegExp("\\t") + lastCol
    else remain the same
    \\=============================================
    but I don't know how to do this
    thanks
    Jonh

  • Result set looping and arrays??????????

    Hey i have a result set problem in using an applet connected to a database.
    After i have accessed a database, i am using a result set to store these values, then put them into arrays to out put to screen. im using:
    count = 0;
    while(rs.next())
    lecturer[count] = rs.getString("FirstName") + " " + rs.getString("Surname");
    room[count] = rs.getString("Room_No");
    sentence = rs.getString("Subjects");
    if(sentence.length()>12)
    space = sentence.indexOf(" ");
    subject[count] = sentence.substring(0,(space));
    subject2[count] = sentence.substring((space+1),sentence.length());
    else
    subject[count] = sentence;
    subject2[count] = " ";
    timeslot[count] = rs.getInt("Time_slot");
    count++;
    resCount++;
    rs.close();
    stm.close();
    The while is there untill there are no more values in the result set. This should work(in theory). But for some reason the while loop goes around and around until 'size' (which is the size for all the arrays) is reached. This is a set value at the start of the applet. But whenever i change it the while loop goes around that many times without fail. this results in duplicate outputs to screen, that i dont want.
    Anyone got any ideas????????????

    This flow doesn't make too much sense to me. Why are you setting an absolute limit on the length of the array, if it should really be determined by the number of rows in your resultset. It sounds like you would be better off using a Collection class, like:
    List names = new ArrayList();
    while(rs.next()) {
      names.add(rs.getString("name"));
    }

  • Setting tablespace threshold

    Hi,
    We have metrics like Tablespace Used (%) for which we have set thresholds, but they are not being collected (as confirmed by the All Metrics screen) - why?
    Agent Version (OMS) -- 10.1.0.3
    Agent Version of target -- 10.1.0.3
    No error messages are issued
    regards
    Dilip

    Go thru the monitoring configuration link at the bottom again. Also try setting the PERL trace in emd.properties to debug and look at the perl.trc file generated for clues.

  • EM 10g Release 3 Grid - how to set up thresholds/notifications

    Hello --
    We have installed EM 10g Release Grid control and I would like to set up all the necessary thresholds and notifications. I would like to set those up for one instance only. So I went to Preferences --> Notification Rules and set up (what I thought) notifications for this one database. However, I keep getting alerts for ALL databases. Is there a way to set this up just for one?
    Also, on the home page in the Related Links section I see the following links related to metrics:
    Metric Collection Errors
    All Metrics
    Metric and Policy Settings
    Metric Baselines
    User-defined metrics
    What are Metric Baselines? How do set those up? Are these also "global" - if I modify those it will affect all of the databases? Is there a quide (like a miniumum) on thresholds - how do you decide on the values? Any insight on this would be greatly appreciated.

    Yes it is easy to be confused. Maybe this will help -
    1) Notification Rules are set to provide you notification when a metric and policy setting is in warning, critical or clear status - (side note here is that clear is clear for warning and clear for critical- so if you set notification to page on clear you can get warning clear and critical clear pages)
    2) Metric and Policy Settings establish warning and critical thresholds - you dont have to have notifications on them.
    3) Baselines can be taken on the live database to establish normal operating thresholds. I am a little weak in the Baseline Space.

  • I have used a 'for loop' to create an array of output data, however I want the each of the data sets from the array to be placed into a 1-D array. How do I concatenate the output of the for loop into a 1-D array?

    I am using this to create a data set that will be passed as an anolog output therefore it needs to have the correct array dimensions to go into the analog write vi.

    I'm updating my request... I've figured out how to do this by copying an example that uses a simple FOR loop (as seen in the attached current version of my VI). My question now becomes this: Is there a way to save the Y values corresponding to those X values into two more arrays? That is, just for argument's sake, let's say I took the first 100 elements from the X array, and found them to be positive. Then I would like to take the first 100 elements of the Y array and put them into a 'Y Values for X > 0' array. ...And likewise with the negative X values, they should have a separate array of corresponding 'Y values for X < 0' array.
    I can see that I should somehow save the indices of the positive X values from the large arrray wh
    en I sort them out, and use those indices to pick out the elements from the main Y array with the same indices.
    I just can't seem to set up the code necessary to do this. ...Can anyone help, please?
    Attachments:
    Poling_Data_Reader_5i.vi ‏79 KB
    30BLEND.txt ‏3 KB

  • Setting up an array and displaying results

    I’d like to display query results in a table like this:
    KSAStatement\JobType JobType1 JobType2 JobType3 JobType4
    KSAStatement1 PRRating11 PRRating12 PRRating13 PRRating14
    KSAStatement2 PRRating21 PRRating22 PRRating23 PRRating24
    KSAStatement3 PRRating31 PRRating32 PRRating33 PRRating34
    etc
    The JobTypes are associated with a list of KSAStatements. For
    each JobType/KSAStatement pair, there is a number rating that needs
    to be displayed.
    My database query is pasted in the code section below.
    Someone suggested that I need an array that looks like this:
    skills[GetSkills.JobType[CurrentRow]][GetSkills.KSAStatement[CurrentRow]]=Get.Skills.PRRat ing
    How do I set this up in ColdFusion?
    Do I need to set some intermediate variables?
    For example:
    thisJobType=GetSkills.JobType[CurrentRow]
    thisKSAStatement=GetSkills.KSAStatement[CurrentRow]
    Then set the array value
    skills[thisJobType][ thisKSAStatement]=GetSkills.PRRating
    Or do I build up my 2D array in two steps using two initial
    queries?
    For example…
    An inner array:
    Skill[0]=Persuasion
    Skill[1]=Writing
    And an outer array:
    JobType[0]=SalesAssistant
    JobType[1]=VPofSales
    And then use the query below to build up
    Rating.Job[1].Skill[1]=5 (which means that VPofSales has a Writing
    rating of 5)
    I could especially use some help with cfloops.
    Thank you for any suggestions!

    You can make a rectangular two-dimensional array, and leave some spots empty. Or, you can make a ragged array (not every row the same size). Google "ragged array java" for details.

Maybe you are looking for