initialize the array index

Hello!

I'm new to LabView and I am struggling with this problem for a few days...

I have a 2D x CH spike_time table and on each line (table 1 d), I need to implement logic that requires the ability to dynamically initialize the two indexes.

To be more clear, if I says each line of the table 2D with CH, it is the logic I should apply on each line:

i = 0;

while I<=>

{j = i + 1;

While ch (j) AND (i) - ch (j) ch<= inter_spke_interval="" and="" j=""><=>

{j = j + 1 ;}

If j - i + 1 > = min_burst_size then save (i, j);
I have = j;

}

What is the best way to apply this logic in labview?

How can I manipulate the value of the indxes, i and j to initialize as in the code? I tried to use the "Subset of the table" function in order to 'cut' subset of the line from i and j and records the SHIFT to pass again the subset as the loop, but I couldn't a solution anywhere nearby.

If someone could share some ideas with me or has a similar vi useful, I would be very grateful!

Thank you very much!

Hi MG,.

I already said you can use SHIFT registers to store I and j!

Tags: NI Software

Similar Questions

  • Determine which cluster and the array index element was clicked on table clusters

    Hello

    I'm overload of brain with dynamic events and references and nodes of property etc.

    I am trying to identify the cluster and the array index element that was clicked on table clusters

    This gives me the name of the element:

    Is this reasonable?  How can I get the index?

    Thank you

    Paul

    Hello

    Download the VI in this link (also attached).  It gives you the index of the array element that you clicked. Hope this will help you.

    Kind regards
    Nitz

    (Bravo to give good answers, mark it as a Solution If your problem is resolved)

  • Can I call a function using the array index?

    I defined a table that stores the name of the function, like this:

    var aresetButtonTop:Array = new Array(resetTop1,resetTop2,resetTop3,resetTop4,resetTop5);

    Then I have a button named "btnresetTop" which, once clicked will be called one of the five functions stored in the array (aresetButtonTop) above. Functions are called at runtime depending on certain conditions. I need to figure out how I can call these functions using the array index. I use the following code to call the function. The value of i has already been calculated.


    btnresetTop.addEventListener (MouseEvent.CLICK, aresetButtonTop [i]);

    After doing this, I get the following error when I click on the button:

    TypeError: Error #2007: parameter listener must be non-null.
    at flash.events::EventDispatcher/addEventListener()
    at gallerytest_fla::MainTimeline/thumbTopClick()

    Note: thumbTopClick() is a function within which all these codes are written.

    I need to know if it is posible in AS3 to call a function name using array index or not. If so, could you afford ehelp me out.

    You can certainly do.

    In your case, it looks like i is out of range. Show your loop.

  • Initialize the array, then using a feedback node to replace items

    Hello friends,

    I have a typical problem. I need to store values in a table 1 d with 7 elements. I want to start with a set zero array of items. I then start sending values and indices one by one so that the value is inserted in the table and is stored. My problem is when I start with a zero table, what happens is every time I have send a value that it replaces a zero to the correct index, but does not store this value for the next iteration as the zero table defines the table to zero once again. Changes as well as an item in the table all the time. I won't like that. Once started, I want all my values stored in the corresponding index, unless until a value with the same index overrides. Here is my attempt in jpg format. I tried to insert a table of zero which takes place once in a while loop and then connect the spare in feedback mode Board so that the insertion of elements Dummies happens only once. But I am not able to do. Please help me view inthi

    Your image shows that you cannot have a 'next iteration"because there is no point in loop around the code of the replacement array element and the while loop around the table to initialize is useless. You are not clicking on the button "Continuous run" are you? Do not!

    Here's a basic example. You can learn a few basics of LabVIEW by taking some of the tutorials.

  • Initialize the array 1 d with predetermined values

    Hi all

    I'm pretty new to the comm suite, but I'll have one (probably simple) question about the initialization of a constant matrix of 1 d. Suppose I want to create a constant 1 d of the matrix of size M and I want to boot with some predetermined values. Is there an easy/effective way to do it? Initializing one is rather heavy, especially for the great Mr. also, how can I initialize such constant on a Traget FPGA?

    I've seen that for example for metering screws, it is possible to define a constant flow of data and initialize it with a .cvs file. Is there a similar possibility to initialize a constant matrix of 1 d?

    See you soon,.

    Steve0

    Hi Steve0,

    I found a quick solution and dirty to do this, as there is not a clear method to implement a constant matrix arbitrarily large. You can generate an array, but you prefer, my example is seen below:

    Then go to the front, right click on the indicator and select "capture". From there, this table will be available on your range of data to drop as a constant of other VI in this project. You can also do the same with a CSV file by writing your CSV file to a flag and then enter the data to use.

    BeenCoughin

  • moving down the array index

    I'm trying to get my picture to spend his index finger down, so whenever I submit an employee, it will be added to a different index such as a [0] is presented and when I go to add another employee, it will be a [1].

    Here is my code

    It is really simple if you understand one of the basic functions in LabVIEW - the shift register. With this and a table to build, it is not a large part of the code. Here is an example. I also used a structure of the event. You need to change so that when sending is enabled, the values in the cluster are erased.

  • MathScript NaN initialize the array LV 8.6

    For those of us who bought LV 8.2 - 8.6 Mac OS Suite of Dev, the mathscript module won't boot has a table with NaN.

    It's

    c = Nan (m, n)

    and

    repmat (NaN, m, n)

    are broken.

    The only work around I can find is to replace a number, for example '0 ':

    InT = repmat(0,m,n); InT (= NaN;)

    Would appreciate any other workaround to create an m x n array of NaN.

    Hi wjdwyer,

    This has been fixed in more recent versions of MathScript, but for older versions, another workaround potential that I could meet you multiply nan by a table that already exists (see below). I know that's not ideal, but if all goes well it will at least give you an alternative.

    A = nan * repmat(1,m,n);

  • How can I index an element of the array as "index Board" function to labview?

    Hello:

    I am looking for a method to search an array with indexes and return the element specified by the given index.

    as the array index of the labview function, but I can't find an exact symbol in teststand-table-operations/functions.

    I am new to teststand and everyone knows how to use labview in teststand.

    anyone can teach me?

    Thanks in advance!

    Thanks anyway, found in the API

  • Can I use a digital control to change the illustrated index of an array?

    Hey people,

    This could be one of these questions, get feedback 'why would you do?', but I wonder if there is a fairly simple solution, I don't know everything...

    I know that tables are not exactly gems when it comes to claims for benefits, but with my particular application, if I could get a digital control to define what the array index appears, it would be great.  In addition, assuming that it is possible, then I think I could find a way to have two Boolean values which would increment/decrement the element indicated by updating the digital too...

    Any ideas?

    A popular entry!

    THX

    Is that what you wanted to achieve

  • What is the purpose of the function Array Index in the example attached?

    Hello

    I'm fighting with the Array Index function. I found the attached VI on the OR site which was exactly what I wanted to do, but rather than simply accept that it works and use it, I wanted to understand.

    What is the purpose of the function Index of table inside the while loop? If I put a probe on part and on the other, the values are the same, but if I remove the service and connect directly to the > function, I get an error.

    I do not understand the tables but I don't understand what is happening here. Any help would be appreciated gratefully.

    Thanks in advance.

    It is just picking the first reading of the table in the waveform.  If it's good enough (I'd take at least the average of N samples), why not cela?

  • array index

    Hello

    I built a small VI which displays a table 1 d of the images and a table the values of each image pixel 2D (it becomes 3D). I would like to have access to the array index to view the image with its pixel values (see attachment).

    If there is no way to access the index because it's an exit, I thought about a 2 column table where the first column will be composed of images and the second of all the value of the corresponding pixels 2D paintings. And the display could be done at the same time because it will be part of the same table.

    I don't really know if I can do it. This seems a little strange to build an array of 2D arrays...

    Thanks for your help people. I searched a lot but I've yet to find something similar. I enclose my VI (8.0), the FileInfo.vi becomes just a binary information and I read images all the (320 * 240 * 2) + 1016 bytes (frame size) + size of the header of the frame.

    It seems that Matthew has proposed a solution that looks like it will work (unfortunately, I can't do anything in LabVIEW for the moment because I upset him, and it is essentially suspended... I'm trying to give him a chance to redeem themselves before that I have to abandon the process and lose my other works... ). What I would say to you, is to ignore the idea of how you store the data in the way that you view the data. All you really need to see is a single image and a table 2D pixel values, with a kind of control that allows you to change the image and table 2D display.

    Grrr. Curse you LabVIEW! Who would have thought that you could not put 300 k items in a Listbox and expect it to work... I just killed LabVIEW; at least the automatic recovery tool works.

    So, now that it's the road, I can whip up an example. I have attached a quick example where you can basically copy the block schema and paste it into your vi (just replace table 3 and table of Image controls with the sons of your loop (you can delete the indicators related to these threads).) It is a very simple GUI that allows you to drag the cursor to select an image, and when you do, it will display the appropriate image and a table of pixel values. The node property is here just so that when you run the program, the correct values will appear even before you click on anything.

    Chris

  • Get the current index value of the table control

    I have a table control 1 d on a panel that contains a value of temperature curve that I send to a temperature controller. The values in the table are not unique, because for example 40.5 degrees in the table could represent 40.5 degrees on the cycles of cooling or heating. I could have severat heating/cooling cycles programmed into the table. I would like a way to read the array index of the currently displayed item in the array in the up/down control of index on the left of the table control. I could then run curves partial temperature easily by neutrophilia a starting point on the curve in the table control.

    I don't see a property that I can use to get this index value. Anyone have any ideas?

    Thank you

    J

    Use the property 'index values. It will be the first item of the output of a 1-d array.

  • How to use the elements in the array

    Hi, I am trying to automate a questionnaire using table.

    In the compositionReady for the scene

    SYM. Actual = 0;

    sym.arr = ['Hi', 'Love', 'You'] / / this is my picture of the issue.

    sym.checkArr = function() { / / this function I use to check the issue table whis I'll use.}

    sym. Question = arr [real];      I want to use the value 'Hi' and then increase my 'real' var and then use the value 'Love '.

    }

    In my symbol calendar, I use a trigger in the trigger that I use

    SYM. Stop();

    sym.quest = sym.getComposition () .getStage (). Question; / / I get the value of the Question;

    Sym. $("Ask") .html (quest);                                                        "Ask" is an empty textfield;

    sym.getComposition () .getStage (invested) ++;                    Increase 'real' for the nex time.

    But the code does not work, I think that the problem is the way I use the array index.

    Help, please!

    Thank you =)

    Hello

    chino_10 wrote:

    at the outbreak of timeline you why did you use a local variable?

    It is advisable to use local variables when possible. The quest variable apply only to this trigger, and it will not be postponed to another trigger in the same timeline. So when you use a trigger to set the HTML for a text element in the same timeline, I find cleaner to assign a new value of a local variable HTML.

    chino_10 wrote:

    and if you call the 'real' global variable of Manager compositionReady of why didn' there you call him with all the way like ' sym.getComposition () .getStage (invested) ++; '?

    I think I have didn't express it as clearly as I could have. When you declare sym.actual in compositionReady, you actually declared a variable whose scope is the symbol of the main stage - it is not a global variable. To declare a global variable (which is not always recommended), your code in compositionReady would be:

    real = 0;

    This real variable would now be accessible from any element/symbol in the composition simply by assigning a value to the membership. You can see how quickly this could be embarrassing.

    So back to the scope of variables: If you declare a symbol variable using sym.varName, any element in the same scope may call using sym.varName. If your main scenario triggers can call without using the full address of sym.getComposition () .getStage () invested ++. Instead, you can simply use ++ sym.actual. Less code and easier to read. But if you call from another symbol (outside), you need to use the full, addressing the address actually the variable, i.e., sym.getComposition () .getStage () invested ++.

    HTH,

    Joe

  • How re - initialize an array with the new values at run time?

    Hello

    In this application of particluar I want to change the value of a particular index (Ex: 4th move in a 1 d table) and store the changed value (Inremented) in the same index position.

    I wrote a program, can someone tell what I am doing wrong?

    LabVIEW version: 8.6

    Screenshot kindly updated instead of .vi

    Two things.

    First of all:

    You must initialize the table (via the feedback loop).

    Click with the right button on the wire of the array and create constant.  Move the index of item 99.  Initialize element 0.  This thread up to the lower part of the feedback node.

    Second:

    You use an Insert in the table VI, but it's not describe what you try to do.  While he places an element in the position shown is also increases the size of the table.

    This change to a subset of table replace VI.

  • 'Replace the element of the array' replaces not only indexed items

    Hey masters LabView,.

    Fairly new to Labview and I'm trying to sort out how to create a table of images. I know that the total number of images I want in my 'stamp' (not the buffer of LabView), so I'm the initialization of an array of this size. Can I bring this table in a loop For with a shift register, and I want to capture images and write them in the table of the buffe continuously (a comment: I do a circular buffer, but I don't want to implement in LabView, because there a lot of things that I don't need and I will eventually have to the process to be as thin as possible).

    Here's the problem (I assume an implementation, that does not decompose LabView):

    I expect:

    AN element of the array, in the position indicated by the index of the loop [i], is replaced by the image newly caught

    I get:

    All THE elements of the array becomes the image newly caught.

    (I can tell because I taste under the table, grabbing a single image from a constant "Check Array" index - may 7, for example.) But my index of the loop [i] value is 13, and the subsample becomes again the image newly caught.

    What a ridiculous thing I am doing wrong?

    Any help would be greatly appreciated.

    Ah, I just noticed something.  Initialize you an array of references at the beginning of your program, but it is a complete picture OF THE SAME REFERENCE: you must call the IMAQ Create in a loop so that you actually get unique references in your table.  You must have a different NAME for each image.

Maybe you are looking for