Deleteing element by element in 2D array

Is there away to delete element by element in 2D array without changing the dimensions to 1D array. I want to select the first 20 element reading across the rows. For example, If I have 2D array with 6 element in each raw. I want to select the first three rows and 2 elements from the four raw.
Regards
Hussain

Maybe I completely misunderstand what the OP tried to say / do, but you can accomplish it without using clusters.  Comments from others are correct, you cannot resize the 2D array by deleting elements within a given row..  However, maybe you want to achieve what is described below.
Do keep in mind that if you attempt this with a numeric array, you may want to use 0 or 'NaN' as your deleted value.
See code below which should be self-explanatory.  There are probably better improvements of the example, but the purpose was simply to show how it can be done.
Array 1 shows the original 2D array and it's values.
Array 2 shows how you can "delete" or replace its element with a "deleted" value.
Array 3 shows how you can "delete" multiple elements (replace multiple elements with a "deleted" value).
Attachments:
deleting inside 2D array.png ‏32 KB
delInside2Darray.png ‏29 KB

Similar Messages

  • How To Delete Multiple Query Elements in a Transport

    Guys,
    How do you delete Multiple Query Elements in a transport in DEV? Or it's not posible.  I tried to select multiple but only one is being deleted.
    Thanks,
    Recca

    Hi Recca,
    As Nanda said, just go to tcode SE03..Click Unlock Objects (Expert Tool)..Paste your TR number (one at a time) then click Unlock..
    Go back to SE10 and delete your TR numbers..
    Regards,
    Loed

  • How do I convert a 1-D array of cluster of 5 elements into a 2-D array of numbers? (history data from a chart)

    Hello,
    in my vi I have a chart with 5 Plots displaying measurement data.
    The user should be able to save all the history data from the chart at anytime. (e.g. the user watches the chart and some event happens, then he presses a "save"-button)
    I know, that I can read out the history data with a property node. That is not the problem. The problem is, how do I handle the data? The type of the history data is a 1-D array of cluster of 5 elements.
    I have to convert that data somehow into a 2 D-array of numbers or strings, so that I can easily save it in a text-file.
    How do I convert a 1-D array of cluster of 5 elements into a 2-D array of numbers?
    I use LabVIEW 7.1
    Johannes
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Solved!
    Go to Solution.

    Gerd,
    thank you for the quick response and the easy solution.
    Look what I did in the meantime. I solved the problem too, but muuuch more complicate :-)
    And I have converted the numbers to strings, so that I can easily write them into a spreasheet file.
    Johannes
    Message Edited by johanneshoer on 04-28-2009 10:39 AM
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    SaveChartHistory.JPG ‏57 KB
    SaveChartHistory.JPG ‏57 KB

  • How to delete the last element of a collection without iterating it?

    how to delete the last element of a collection without iterating it?

    To add to jverd's reply, even if you could determine the last element, in some collections it is not guaranteed to always be the same.
    From HashSet:
    It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time.

  • Indexing array of references element by element

    Hello,
    I have a simple question. How do I go about indexing an array of references element by element? For example, when using a cluster reference, there is a property node called "controls [ ]" that we can pass into a for loop. For a normal array, "enable indexing" is usually automatically turned on when entering a for loop. Why is it that for an array of references, this is not the case? Thanks for the help.
    Solved!
    Go to Solution.
    Attachments:
    array_of_references.JPG ‏35 KB

    Since the Get Image is a method, it has to work on something, and that would be a picture control or indicator.  (If you look at the Get Image Method for the array, you'll notice it only returns an image of the front panel object, so I think you'd just get a picture of the array as it looks on the FP).
    So you'd send the picture to an indicator, then use the Get image method on that indicator immediately afterwards.  See attached.  I didn't try this out so I can't be sure it would work, but I think it would.  But it would still be a major hack compared to just using the Picture to Pixmap VI.
    Message Edited by Ravens Fan on 03-27-2009 01:03 AM
    Attachments:
    Array_of_References[1]_BD.png ‏12 KB

  • How to delete/close WBS elements

    Hello Guys,
    We are facing following issues - We have some WBS elements that has not been migrated from company code XX (now incative). Now we canot close those WBS and we are getting errors when posting Settlements (CJ8G/CJ88).
    Error - Asset under construction not completely credited.
    There are some old bookings on the WBS (total sum = 0)  but SAP does not allow us to close it. As this is already closed company code we cannot create assets here anymore.
    Do you know if there is a way to close or delete such WBS elements?
    Thank you..

    Hi Tushar,
    Following the screenshot sent by Tomas, there are many steps which needs to be carried out before setting the deletion flag for the WBS element. One is to ensure that the mandatory fields for the asset are filled as rightly pointed out, second is to ensure deactivating the asset, third is to delete the existing PO's/PR's associated with the project. This will ensure that the WBS element is back in its original state which will then allow us to mark the deletion flag or set the WBS element as deleted. However cant we close the WBS element and then try to set the deletion flag? Is this a wrong practice you feel?
    Kindly advise
    Regards
    Varun

  • Delete active Cost Element

    I have a client who created a cost element in error.
    They then posted to it, so it can be deleted.
    It needs to be deleted as it affect CO-PA postings.
    Does anybosy know of a way to delete a Cost Element, mid Fiscal Year for a Cost Element that has a balance.
    I have looked on OSS but cant see anything. There must be a re-set program somewhere.

    Hi
    As per my understanding, if you have posted any transaction during a fiscal year, then it cannot be delimited for the whole fiscal year.
    Hence I suggest you to delete the cost element in T.code KA04 from the first date of next fiscal year upto 31/12/9999.
    Regards

  • How to display last element in a dynamic 1d array

    hi..
    i want to display the value of last element in a 1d dynamic array.../ i mean ..if i stop the vi run, i need to display the last element in the array..how can i do this?
    and is there any way to use a button to start the vi...instead of using the Run button on the vi front panel??
    Solved!
    Go to Solution.

    Index array!.  Use array size to determine the size of your array, subtract 1, feed that in the index terminal of Index Array.
    You have to start the VI running somehow.  It could be set to run when opened.  Assuming what you want is a means to type values into a front panel, hit a GO button that you created on the front panel, then have the real part of the VI execute.  You could use an event structure.  Or put a while loop at the beginning with a small wait statement in side that basically just polls the GO button.  When that button is pressed, the true boolean stops the while loop and allows the program to proceed to the main body of your program.

  • Set number of elements in a two dimensional array

    Hi,
    Does anyone know how to set the number of elements in a two dimensional array directly in teststand.
    To set a one dimsional array is simple:
    SetNumElements( locals.somearray,4)
    Is there a method to do this for a two dimensional array?
    Sean

    From the help file (TestStand 4.2.0):
    PropertyObject.SetNumElements
    SetNumElements Method
    Syntax
    PropertyObject.SetNumElements ( numElements, options = 0)
    Purpose
    Sets the number of elements of a single dimensional array.
    Remarks
    This method is only valid for single dimensional arrays. The elements in the array retain their values. Use the PropertyObjectType.ArrayDimensions property to set the number of elements in each dimension of a multi-dimensional array.
    Parameters
    numElements As Long
    [In] New number of elements for the array.
    options As Long
    [In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options.
    This parameter has a default value of 0.
    So you could use, for example: Locals.MultidimensionalArray.Type.ArrayDimensions.SetBounds({1,0},{3,4}) to set an array to have three dimensions (1,2,3), each with five elements (0,1,2,3,4).

  • Help on creating and deleting xml child elements using Toplink please.

    Hi there,
    I am trying to build a toplink xml demo illustrating toplink acting as the layer between my java code and an xml datasource.
    After pulling my custom schema into toplink and following the steps in http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/jaxb/index.htm related to
    Click on Mapping Workbench Project...Click on From XML Schema (JAXB)...
    I am able to set up java code which can run get and sets against my xml datasource. However, I want to also be able create and delete elements within the xml data for child elements.
    i.e. in a simple scenario I have a xsd for departments which has an unbounded element of type employee. How does toplink allow me to add and or remove employees in a department on the marshalled xml data source? Only gets and sets for the elements seem accessible.
    In my experience with database schema based toplink demos I have seen methods such as:
    public void setEmployeesCollection(Collection EmployeesCollection) {
         this.employeesCollection = employeesCollection;
    Is this functionality available for xml backended toplink projects?
    cheers
    Nick

    Hi Nick,
    Below I'll give an example of using the generated JAXB object model to remove and add a new node. The available APIs are defined in the JAXB spec. TopLink also supports mapping your own objects to XML, your own objects could contain more convenient APIs for adding or removing collection members
    Example Schema
    The following XML Schema will be used to generate a JAXB model.
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="department">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="employee">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>---
    Example Input
    The following document will be used as input. For the purpose of this example this XML document is saved in a file called "employee-data.xml".
    <department>
         <employee>
              <name>Anne</name>
         </employee>
         <employee>
              <name>Bob</name>
         </employee>
    </department>---
    Example Code
    The following code demonstrates how to use the JAXB APIs to remove the object representing the first employee node, and to add a new Employee (with name = "Carol").
    JAXBContext jaxbContext = JAXBContext.newInstance("your_context_path");
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    File file = new File("employee-data.xml");
    Department department = (Department) unmarshaller.unmarshal(file);
    // Remove the first employee in the list
    department.getEmployee().remove(0);
    // Add a new employee
    ObjectFactory objectFactory = new ObjectFactory();
    Employee newEmployee = objectFactory.createEmployee();
    newEmployee.setName("Carol");
    department.getEmployee().add(newEmployee);
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    marshaller.marshal(department, System.out);---
    Example Output
    The following is the result of running the example code.
    <department>
         <employee>
              <name>Bob</name>
         </employee>
         <employee>
              <name>Carol</name>
         </employee>
    </department>

  • How can I delete a cost element group

    Hy,
    I have a new system and the cost elements groups came with the questionary. Now I want to delete them, but I have an error like : "You want to delete object (Group element cost BON_1000). This is not possible because the object is being used in another object (group, report ... )." It is possible somehow to delete cost element group?
    I don't have any other dates in the system. Thank you!

    Hi Biro Dorel 
    The cost element group can be used by either back end configuration like cost component structure or front end transactions like allocation cycles.
    Please make sure none of any front end or back end functions are using the cost element group.
    If you do sure your system is new and no transactions use it. Please check whether the group is used by another cost element group. Or if you do not know where it is used, try to use the "where used list" to find the object using the group by click the buttom on the tool bar in the cost element group maintenance window (T_KAH3).

  • How do I delete photos in elements with out deleting them from my folders ?

    I am new to adobe. How do I delete images from elements 12 with out deleting them from my folders. ?

    When you select files to delete from catalog you get a dialog asking if you want to delete ALSO from disk : you don't. Simply don't check the check box.

  • Deleting pictures from elements

    I have been deleting pictures in elements to make more room on my hard drive and just noticed a box on the screen about deleting also from the hard drive.  Can anyone help me try and figure out how to sort out on my hard drive what pictures I have deleted from elements. Somethng easy and not too time consuming would be nice.  I am assuming that all this work I have been doing to delete pictures has not at all freed up anything on my hard drive.  ugh!
    I have looked at my "pictures folder" and nothing seems to be in folders or have any organization.  Since moving my elements to a new computer I have had to reconnect all my pictures.  Can I organize the pictures in folder and then if I ask elements or reconnect them will it be able to?

    It's really not a good idea to let elements delete the photos in any case. Your camera has its own directory structure that the computer doesn't fully understand. It's preferable to just reformat your card in the camera or delete the photos directly in the camera, rather than letting a computer do it for you.

  • Determining if element is in a certain array

    Hi,
    I was wondering if there is a way to determine if a String element is part of an array of Strings. In other words, I want to do something like:
    String myString = "blah";
    String[] stringArray = {"blah", "foo"};
    if (myString is part of stringArray) {
    // Do stuff here
    }The reason I want to do this is because I have two large String arrays, and want to determine if a String element is in one array or the other, and do some stuff based on the result.
    Is there a way to do this? If so, how? Could I use compareTo, or something like that, to determine if it is part of an array?
    Thanks,
    Dan

    Use java.util.Arrays.binarySearch(stringArray, myString) if the array is sorted, or use a more high-powered collection class instead (such as a java.util.ArrayList, and the methods it provides to search within).
    http://java.sun.com/j2se/1.5.0/docs/api/index.html

  • Does any body know how to replace a chunk of elements in a 2-D array

    I have a vi that I am working on that needs to be able to replace a lot of elements and I would like to replace them all with 1 operation. thanks in advance vivi

    I you want to replace a "rectangle" inside a 2D array, you can wire a 2D array into the element input of the Replace Array Subset. In that case, the index you wire into the function will specify where you start the replacing.
    Try to take over the world!

Maybe you are looking for

  • Smartforms, Picture or Grafic from Content Server

    Hello, I need to create a smartforms where I must display a picture or grafic. This picture is at a content server and the picture depends on a material nr. How can I display such a picture in Smartforms and how can I get this picture from the conten

  • Create a form without the option to submit or send via email

    Just oant to know is it posible to create a form without the option to submit or send via email. I want my students to fill in the form and save it to a personal folder. The submit form button creates confusion.

  • Increase  of number of digits in pricing

    Hi, Can any one suggest me how to increase the number of digits in pricing. For example, currently the system allows you to enter 10 digits, how can I enter 11 digits in the pricing field? Helpful answer will be given points Regards Sudha

  • Expplode 3d pie chart issue

    Hi All, How to import explode 3d pie chart in webi from excel , i hope there is no explode option in webi .plz help me out about this issue Thanks in Advance

  • Hyperion Workspace window - Working....

    Hi, this is not so much a newbie question, as an 'I have not touched planning in 18 months question'.... A fresh install of Hyperion planning, finished and configured with no errors. I access the Hyperion Planning log in and it comes up successfully,