Indexing for loop while seizing the unique values in table

Hi all

I have another question. Overall, I have a table and I want to take each element of this array. My thoughts of how do are the following:

I use a loop for the indexing of my table. Then I create a local variable outside of the loop in order to get the individual elements of the array. But it does not work I think because the local variable is not updated at each iteration.

Also, it feels like there is a more elegant way to do what I want to do.

Can someone give me some advice to solve my problem?

Thank you very much.

Best regards

Tresdin

I don't know why you are so hung up with a local variable to send sequential orders of VISA.

Here's what I do:

That sends commands to the SCPI 7 to my AC source with a delay of 100 ms between each command sent.

Tags: NI Software

Similar Questions

  • kindly tell how to use the unique value of a table with the index 0

    kindly tell how to use the unique value of a table with the index 0

    Hi
     
    Yep, use Index Array as Gerd says. Also, using the context help ( + h) and looking through the array palette will help you get an understanding of what each VI does.
     
    This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
     
    -CC
  • get the index of the same values in table

    Hi guys,.

    I'm trying to get the index of array elements with the same value but it can solve mine.

    my case is:


    array1 = [1,2,3,4]; <-here are the names of the pages, always in the order of CSA (these table I used only to check the results of my work, probably will not be for you but maybe...)

    array2 = [1,1,2,2,2,3,4,4,4]; <-these numbers are random, but always in the CSA order (these are the names of pages for items in table 3)

    array3 = [a, b, g, i, f, e, c, h, d]; <-these are all the values of the elements I want to work with later. number of articles is still the same as in array2, their indexes are corresponding.

    array4 = [];

    I need to remove array3 everything, but one of each issue of array2 (as I will remove duplicates) or push to array4 an article of array3 for each number of the array array2 (as I'm going to ignore duplicates)

    don't know is my desc is clear enough, but the result I get is:

    ex. [a, g, e, c]

    above example for each number of array2 array3 items, but do not have to be first, can be second or third if etc exist, but have to be alone.

    I thought that if I get duplicate values, the index in the array array2 and delete this index in array3 will get what I want, but can not solve.

    You will appreciate all help.

    Thank you

    Try something like this:

    var array2 = [1,1,2,2,2,3,4,4,4];
    var array3 = ["a","b","g","i","f","e","c","h","d"];
    
    var tempArray = [];
    var resultArray = [];
    var n , x ;
    
    for(var n=array2.length-1;n>=0;n--)
    {
        var string = ""+array2[n];
        tempArray[string] = array3[n];
    }
    
    for(x in tempArray)
    {
        resultArray.push(tempArray[x]);
    }
    
    resultArray.reverse();
    // a,g,e,c
    

    Hope, that helps.

    Uwe

  • How much space do I need to allow for Vista while partitioning the hard drive?

    How much space do I need to allow for Vista while partitioning the hard drive?

    I am installing on a new drive hard and need to partition the hard drive.

    I remember he had a certaing amount allocated for vista and before recovery.

    Help, please!

    Hello

    40GBs is the minimum; who will be vey quickly useless.

    Recovery partition would have been photographed by the manufacturer of the computer hard disk and you can't replicate that.

    You can use all of the hard disk space available to install Vista on.

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • Photoshop CC was supposed to be able to use without an internet connection if I worked online at least once a month...  I tried to work offline at home after working online for a while. The sign came and said ' no Internet connection /- and the options we

    Photoshop CC was supposed to be able to use without an internet connection if I worked online at least once a month...

    I tried to work offline at home after working online for a while. The sign came and wrote

    «No Internet connection / - and the options have been - try again or continue offline "and I could not work no prob. by choosing «continue in offline mode»

    However, I've used photoshop for a few hours yesterday and I brought my laptop home from my photographer friend to share the work of editing... and I couldn't open Photoshop.

    "The network is not connected TRYagain.

    It was the only option, does not allow me to continue offline...

    You have an idea why I couldn't?

    An Internet connection is required the first time you install and your creative Cloud of license applications.

    You can use the applications in offline mode, but must be online from time to time to validate your software licenses. Please see this link for more details: CC help | Creative cloud / Common Questions

  • For loop runs with the value of N unwired

    In this case will be a loop run connected to the loop N worthless? I have seen a few examples of the loop for run without a certain number of times set to be ran wired or for example a size of table or something like that.

    PauldePaor wrote:

    Here's a program I am and as you can see the image that the program runs without the loop N being wired. The program will run without problem

    As everyone else has said, you don't have to plug something on N.  If you wire up a table for loop for input "auto-index", the loop for will run automatically the smaller table size.

    Perhaps an example will help:

    This makes a loop on my table size (in this case, long of 5 elements).  On the edge of the loop for which resembles [] brackets, indicates that it is auto-indexé.  The loop should go through each item one at a time (1, then 2, then 3, then 4, then 5).

  • PL/SQL loop to find the minimum value

    I want to find the minimum value from a table using the pl/sql loop

    I have data format below.

    1 ABC 2

    1 ABC 20

    1 ABC 500

    1 ABC 2000

    XYZ 2 250

    JKL 3 300

    MNP 3 350

    3 KLM 400

    I wrote the code below. His does not work. Please suggest.

    Set serveroutput on
    declare
    x number: = 3;
    y VARCHAR2 (3): = 'ABC ';
    fmin number: = 0;
    number of Fmax: = 0;
    Start
    for rec in (select sal from test
    where id = name and x = y) loop


    If rec.sal > fmin then
    fmin: = rec.sal;
    on the other
    FMAX: = rec.sal;
    fmin: = fmax.
    end if;
    end loop;
    dbms_output.put_line (Fmax);
    end;
    /

    I want to output 2 on top of code.

    Thanks in advance

    Why PL/SQL? SELECT MIN (SAL) OF TEST will be more rapid and much less coding. In any case:

    declare

    number of v_min_sal;

    Start

    for v_rec in a loop (select sal from emp)

    If nvl (v_min_sal, v_rec.sal + 1) > v_rec.sal

    then

    v_min_sal: = v_rec.sal;

    end if;

    end loop;

    dbms_output.put_line (' lowest salaray is "' |") v_min_sal | '"');

    end;

    /

    The lowest Salaray is "800".

    PL/SQL procedure successfully completed.

    SQL >

    SY.

  • How to find the index of the closest value in table

    Hello

    I have a double-table A and a double value B.

    I'm looking for on what number in the table A is the closest number to number B?

    Thanks for help

    If the array is sorted, built-in 'Threshold 1 D Array' might work for you.

  • something is very wrong with my installation of CC. The CC desktop app won't show what apps I have, and when I select that tab the spins of the wheel for a while, then the application closes. I am running Yosemite 10.

    Something is very wrong with my CC desktop installation. The icon will not be displayed in the top bar, as it always has. When I start from th finer, it starts, but when I select the Apps tab's turn for a while and then closes. Tried to reinstall downloads of Adobe. Same behavior. That is what it is?

    Rdgates55 did you use the solutions on App does not open. Wheel of progress turn continuously?  If yes what creative application Cloud Desktop version do you use?

  • Security error while deleting the LookUp value

    Hi Experts,
    I want to show my own values in the drop-down list user type create user screen. It is mapped to the definition of research: Lookup.Users.Role. I added my custom console design in this choice list values, but when I tried to delete the existing values of this consultation, I get this error:

    Keyword Error: DOBJ. INVALID_DELETE
    Description: The security level for this data element indicates that it cannot be deleted.
    Remedy:

    Action: E
    Gravity: M
    Help URL:

    Detail:

    Any ideas, please help!

    You can remove the value directly from the database table.
    HGLN and LKV tabales are used.

    LKV contains the values from the lookup function.

  • Import/rasterize multiple PDFs for dosage while retaining the file names?

    If all goes well, there is a way I'll be able to do this, but as the yet I have not found:-based daily, I opened anywhere from 30 to 60 pages simple PDF files in Photoshop, enlarge the size of the canvas and paste a series of registration marks cut in each file, and then close and save as jpg files. I have a couple of different actions I use batch of the overall task which has helped things pretty well, but the only thing that I need to find a way of doing is to 'mass open' all files while maintaining their unique file names. The only way I could do it til now is to open all the files at once by clicking in the import PDF dialog box. If I try to open them all by using an action in an automated batch, it will apply the name of the first file open all the files they are stored outside at the end of my lot. I feel that I should know how to do this, but I'm not having any luck... Nobody knows the right way?

    Image (in tools/photoshop bridge) processor has the ability to open multiple images, perform an action, and then save as a jpeg.

    Could focus on this.

  • Simply extract the unique rows in table 2d

    Hello, I'm sorry for my English. I have a chart 2D with thousends of rows and 2 columns. I want to extract only the unique rows in the table. So I need to exclude all lines have that / which (?) duplicate (s) and exclude the duplicate (s) too.

    Simple example:

    Input array:


    0 0 ---> single

    0 1 ---> D1

    1 0 ---> single

    1 1 ---> D1

    0 1 ---> D2

    2 0 ---> single

    1 1 ---> D2

    2 0 ---> D1

    1 1 ---> D3

    2 0 ---> D2

    2 2 ---> unique

    Desired output table:


    0 0

    1 0

    0 2

    2 2

    Can someone help me?

    Hi Werty,

    To do this is to compare each line with the entire table and count the number of matches.

    If there is only a single match, then the line is unique.

    Here is an example:

    Outside for the index of the loop through each line.

    Inside of the loop compares each line with the entire table and counts the matches.

    Then, a check is made to see if this line is unique.

    The case statement adds unique lines in the output array.

    Note: Use a table function build in a loop like this could cause problems if there will be a large number of unique lines.

  • find the closest value in table

    Hi all

    I need to find the values in the "C" line which is equal or close to the values 'A' in the 2D array, and then I want to show the values of 'B', corresponding to the values of 'C' in table 2D.

    How can I fix it?

    Thank you!

    0.9967 nearest value is 0.993807 in the 8 Cand in row B row, not 1. The differences are 2.893E - 3 and 3.300E - 3.

    Subtract each value from the table C. take the absolute value of the difference. To find the index of at least using Max & Min value of B. Using autoindexing array Index, create the output array.

    Lynn

  • How to compare the original value of table size and the changed value

    juice I took a table and then took the function of the size of the array so that it shows me the number of the elements present in it. so it'll be the original table size value. If the items in the table even changes another value, then I want to compare the original table size value and the value of table size has changed. How to compare... Please help me. you are looking for a possible solution. Thank you

    Hi stara,

    the attached picture shows the ony solution.

    It will be useful.

    Mike

  • How to compare the 3 values in table

    Hi all

    This is my first post so be tolerant

    I need to find "bad values" in the table, it will be easier to explain with example:

    I have a table like this: 0 0 0 0 0 0 0 0 5 0 0 0 0<- so="" "5"="" is="" the="" bad="" value,="" my="" method="" is="" to="" check="" two="" of="" nearby="" values="" so="" x(i-1)="0," x(i)="5" x(i+1)="0," and="" if="" checked="" value="" is="" more="" than="" 25%="" bigger="" or="" smaller="" it="" should="" be="" replaced="" by="" average="" of="">

    example: 0 1 2 3 4 9 6 7 8<- bad="" value="" is="" 9,="" and="" result="" of="" my="" filter="" should="" be="" (4+6)/2="">

    I did it using the formula node (not 20% and no way, but the point is the same) and it works but now I want to do without C and I had a lot of problems because of the size of the array memory is 10000.

    I joined thah vi and signal, you can test that it works very well

    Thank you

    Mike

    MeeHow wrote:

    ... What is the problem?

    Because the first incorrect value is the point of 2780, because it is also disabled because the average of neighbour is biased by the incorrect value to 2781.

    You could jut blindly replace all values with the value that has the lowest absolute value among the three points that we have. Here's a quick project, seems pretty good, but it really depends what you want.

Maybe you are looking for