How can I create the subtables based on the index positions in an array of distinct index?

Please forgive me if this question is fundamental or obvious. I'm relatively new to LabVIEW and I'm learning as I go along.

I have a table 1 d of the values of the index (the number of possible index values is not fixed, but varies between the uses of the application, it could be just {0, 1} on a day and {1, 5, 11 678} on another) and a table 1 d of the measured values (doubles). I would like to analyze measured in sub-tables for each index value, so that if my board index was:

[0 1 1 1 1 5 5 0 5 5 1 0 1 1 5]

and my table of measurement was:

[0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.11 0.10 0.12 0.13 0.15 0.14]

I would like to return 3 sub-tables:

[0.1 0.12 0.8]

[0.2 0.3 0.4 0.5 0.11 0.13 0.14]

[0.6 0.9 0.7 0.15 0.10]

I know that there must be a simple way to do this, I guess I'm stuck just too matlab-table thinking to understand... Please help!

-jph

One of the problems is that your subsets are not of equal length and you also do not know the number of subsets in advance, you will need to decide on a suitable output structure. I suggest a picture of clusters, each element that contains the subset and, possibly, the tag.

Here's a very quick example (LabVIEW 8.0). See if it makes sense. Please check the correct operation. There could be bugs, but the concept should be clear.

Tags: NI Software

Similar Questions

  • How can I find the index from a specific container?

    How can I find the index from a specific container?

    For example, if I'm crossed by officials texts bound like so (example, not yet tested):

    var doc = app.activeDocument;
    
    var story = doc.pages[0].textFrames[0].parentStory;
    
    for (var i=0, l=story.textContainers.length; i<l; i++) {
         var textFrame = story.textContainers[i];
         if (textFrame.constructor.name == "TextFrame") {
              
              var lastPara = textFrame.paragraphs.lastItem();        //How can I find the index of this in relation to the story?
              
         }
    }
    

    How can I find the index of "lastPara" with regard to history rather than the current container?

    I tried:

    var newPara = story.paragraphs[lastPara.index];
    

    but this translates an object not valid...

    alert(newPara.isValid);      //returns false
    

    The .index property is the offset of the character. Then lastPara will start to story.characters [lastPara.index].

  • How can I create the page sizes personalised in InDesign when creating postscript files?

    Greetings ~ I have Mac OS X 10.8. How can I create sizes of custom page from InDesign when you create a post script file? Do I need a virtual printer?

    Is there a reason that you are not exporting to PDF directly from InDesign?

  • Please how can I create a page based on template and save in the specific folder.

    Please, I spent two days trying to solve this problem.  Here's the situation.  I'm trying to create a Web site for our school.  I created a master template which I intend to use as a base for each teacher's webpage.  I also created folders for each teacher, teachers had to send me their weekly updates what duties inlude, photos and downloads.

    Here's the problem: whenever I have to create a page based on the template of the page is created in the root folder.  There is no way to create pages in the files of specific teachers.  I save the page and try to drag to the respective folder.  When I try to save the file, Dreamweaver he re-recorded in the root folder.  If I try to view the html file in the folder of the teacher that the overview does not load.  I have three books of refernce DW, including the Missing Manual and no of them don't address this problem.  Neither is Adobe.

    Surely someone here created a page based on a template and placed in a folder without breaking all the paths.  Why DW does not provide a way to save a page template based in a specific folder.

    Thank you all for responding.  The problem was that I was using DW on my macbook.  To access save as function I finally understood that you must click on the small triangle next to the name. not the Favorites or recent locations triangle.  Lost two days trying to understand cela.  Incredible.

  • How can I create a movieClip based on a predefined number?

    I have tried to create videos in loop of a predefined amount. especially I want to have variables defined as btn1, btn2, btn3 etc.

    That's what I did, but I don't know how to put the number in the variable:

    (I have all other codes in place such as the updated languagesIndex etc - this is the part of the code, I work with):

    btnLL = [];

    for (var i: uint = 1; i < languagesIndex; i ++) {}

    [i] var BTN: MovieClip = new MovieClip(); "[i]:" will not part, but what is the right way?

    btnLL.push (btn [i]); also how we push all the inclinometer in this table?

    }

    do you know how to do this?

    PS I know on the award of a 'name', but I'm doing it as described above...

    I don't think you can get what you intend that what you're after would be somewhat as follows...

    var btnLL = [];

    for (var i: uint = 1; i
    This ["BTN" + String (i)] = new MovieClip();
    btnLL.push (this ["btn" + String (i)]);
    }

    trace (this ["btn1"]); will work
    trace(btnLL[0]);      will work
    trace (btn1);           will fail

    You should not need to bother with the denomination in all cases if you use the table.  You can easily make use of that in the same way than what you can try using the names that you want to use...

    for (var i: uint = 1; i
    var btn:MovieClip = new MovieClip();
    btnLL.push (btn);
    }

    trace(btnLL[0]);      will work

  • How can I get the index of the current pulse model vi?

    I would like to be able to see the current index pulse model vi. According to the help of Labview, a pulse is generated whenever the entered delay (d) is equal to the index (i). Is it possible to get the current index that the vi is on? If so, how could I do that?

    Laura121,

    Your question suggests that you can not understand how the VI.

    You are referring to pulse Pattern.vi in the line object and Pulse Pattern.vi in the text of your message.  Here are the two live different in the context of your question, it seems that you are referring to the Pattern.vi impulse.

    When the VI is called, it returns a table in its entirety (of length = samples). For the Pattern.vi of pulse all the elements of the matrix results are zero except the index i = d, where the element has the value = amplitude.  So, there is no concept of "current index that the vi is on" with this VI.

    Lynn

  • How can I make the. index.html, the start page?

    I published directly from my Web site using ftp Muse interface. The problem is that the area already has a Web site. So when I published using Adobe Muse, the new design starts from www.crystalcom.net/index.html where, as the old site interface remains in the www.crystalcom.net. How can I make my index.html, the start page and clear the previous site completely. Thanks in advance

    Hello

    This can be done by your end host please contact you host make index.html as starting or landing page of the doamin.

    Kind regards

    Vivek

  • How can I delete the index.html file automatically added my domain homepage?

    I noticed recently that muse adds index.html to my homepage. I want to remove it and revert back to the way it was. This is the 2nd site with that I have this problem

    Hello

    I'm afraid, it's default system process and it is not possible to change the file name for the first page created in Adobe Muse of index.html at home or any other file name.

    You can also refer to some articles about why it is important to have the index.html page in your site: what is the index.HTML Page - default Web Pages , the Homepage - Wikipedia, the free encyclopedia

  • How can I get the stream position for a publication?

    I am writing a CEAP for AfterFx plugin and I need to get the stream position for a composition. I based my plugin on ProjDumper.

    Can anyone help?

    When you place the compA in compB you are supposed to receive an AEGP_LayerH, for this comparison of layer nesting.

    If not, you can use AEGP_GetCompLayerByIndex() on compB to obtain this handle layer, because you know its index. (you must know, you put here)

    If you try to find the layer in compB starting only with the AEGP_CompH of the company, so it's a bit problematic...

    You cannot just ask wherever model is nested, you must analyze each layer for this source control project... yuk.

  • How can I clear the indexed files

    I'm giving my computer away. I deleted the data on the hard drive. However, all data remains in the indexed files. How to delete all the data in the indexed files? This is for Windows Vista.

     

    Yes. It's true.

  • How can you get the index of an enum rather than the enumeration value?

    IM new to labview and I'm trying to read the index of an enum object to the string value has the enum.

    that is for example an enumeration of the values 1, 5, 10, 20 with markings 0,1,2,3 I want to take the index value to use in a code as a string.

    in order to make the values of 0,1,2,3

    Are there simple solutions?

    See you soon,.

    JimJamBot

    It is already a number.

    Try to use a "I32" or similar in the digital palette.

    Ben

  • How can I create the document, only one inch in width and/or height size?

    Hello

    I need to create pdf files that are tiny. These are in fact the labels that are smaller than 1"high and sometimes smaller than! "in width? It is possible to create such a size small document uses any Acrobat X Pro, Acrobat distiller and Acrobat SDK kit?

    Thank you.

    The default minimum page size (height/width) is 3 / 72 "(~ 0,04") for the version PDF 1.4 and higher. " Acrobat and Distiller can create PDF pages that are as small as the minimum dimensions.

  • How can I create a template based on another model

    I have a template that I used for my article pages, but there are several changes that I do when an article page is created according to the model. I would like to create a new tamplate specifically for the pages of my article, but still have the pages of the article was updated to the evolution of the original model which has all the features that are common to all pages.

    Do not even think to go.  Nested models drive you crazy and only create problems for you, not to solve them.  I've never found an application for nested models that could not be resolved more simply and with fewer complications in other ways.

    Please show me your page and tell me what changes you want to make to the layout - and why you feel you need to use nested templates.

  • How can I get the new position before applying the rotation in javafx?

    I had this class but when I print the line.endXProperty () .get () when the low is to apply the property does not change the value

    Can how I get the updated value after processing?

       @Override public void start(Stage stage) throws Exception {

              root = new Group(); stage.setScene(new Scene(root)); 

              line = new Line(); line.setStrokeWidth(5.0);

              line.setStroke(Color.BLACK);

              line.setStartX(10.0f);

              line.setStartY(80.0f);

              line.setEndX(10.0f);

              line.setEndY(10.0f);

              System.out.println("line.getEndX()="+line.endXProperty().get());

              rotate = new Rotate(90, 10.0f, 80.0f);

              line.getTransforms().add(rotate); 

              System.out.println("line.getEndX()="+line.endXProperty().get()); 

              root.getChildren().add(line);  stage.show();

         }

    You can transform the coordinates by the transformations of the node in this way:

    Point2D transformedEnd = line.localToParent(line.getEndX(), line.getEndY());
    

    If you want to turn only by the rotation, you can do this way:

    Point2D transformedEnd = rotate.transform(line.getEndX(), line.getEndY());
    
  • How can I recover the index.xml file?

    I can't open a document Pages I've recently worked on. I get this message: I can't open a document, I worked on. I get the message: the requested index.xml file is missing.  What should I do? Thank you, Miriam

    You have two versions of Pages on your Mac and tried to open an incompatible v5 Pages document, while the Pages ' 09 still worked. You simply leave the Pages ' 09 (the purple ink bottle icon) and then double-click on the same document for it to open correctly in your version of Pages v5 (yellow paper with the pencil icon).

Maybe you are looking for