Index of the matrix

I use the reading of spreadsheet files VI to read a text file that contains a matrix of 52 x 49 with numbers from 1 to 100. I want to find the index of rows and columns where the number 5. How can I do this?

hannesostergren wrote:

Stops 'picture 1 d of research' search for the desired item as soon as the first element is found?

This is why I said that it would be a bit more complicated. You need continue to search for each found clue, until the end is reached.

It is easier to simply browse all the items as follows (change the case enabled to use your file).

Tags: NI Software

Similar Questions

  • How to divide each unique number in a matrix by the number with an index in another matrix?

    Hello

    Basically, the calculation, I tried to do is called "dividing element by element". It is a transaction between two matrices with few passes and lines. The result matrix also has the same demension and each element is obtained by dividing the element with the same index in a matrix of the element with the index even in a different matrix. for examlpe,.

    A = [2 4 6

    3 9 6]

    B = [2 2 3

    3 3 2]

    the result will be

    C = [1, 2-2

    1 3 3]

    Is there an easy way to do another going out each element using the table to index?

    Thank you very much

    Hao Liu

    Use the 2D tables instead of the matrix data type, then just use a simple primitive division. the operation will be done by item automatically.

    (Generally you should always use table 2D instead of the special matrix data type. The matrix data type is most useful for linear algebra)

    (Die, he must be very careful, for example, if you multiply two 2D tables, you get a multiplication of element by element, but if you do the same operation on two matrices, LabVIEW will substitute for a real matrix multiplication, which is not the same. For the division, it seems that the matrices are divided piece-by-piece, so it might work for you directly. You should just be aware that the matrices are often treated differently. "They are a very special type of data).

  • It is faster to index an initialized matrix or use a tunnel auto-indexed, both inside a loop - what happens?

    WARNING: MATLAB user here.

    Note: This is a question of LabVIEW, not a matter of MathScript.  I just use MathScript to demonstrate the point.

    This is background to the particular question.

    In MATLAB if you want to calculate decent efficiency then you want previously declared tables and want the built-in functions.

    This means that it's slow:

    ICT

    for i = 1: 10000

    ENTRIES = rand;

    end

    T1 = toc

    (t1 = 0.266, so 37.6 elements/MS)

    and it's faster

    % start before the next loop, but not copy - paste with it because it slows down it waaaay

    Claire x

    ICT

    x = Zeros (10000,1);  % If not the ', 1' and then it overflows of memory to MathScript

    for i = 1: 10000

    ENTRIES = rand;

    end

    T2 = toc

    (t2 = 0.205, items so 48.8/MS)

    In MathScript, it is an improvement of 23% at run time.

    ratio = 100 *(t2-t1)/t1

    (ratio = - 23.3)

    When I use LabVIEW for the same thing, I get:

    which leads to a computation time of 269 ms for about 10 000 000 elements in a vector.  (Note that this is literally ~ 1000 x faster than MathScript).  He created elements of k ~ 37 per millisecond.

    If I change out for a created matrix indexing, then the time is strange.

    When I run it for 10 elements of k, or about 1000 times less, then he finished in approximately 30ms, or approximately 333 items per millisecond.

    When I run it for 100 k items, or about 10 x more last run and 100 x less than the previous vi, and then it ended with about 5000 ms, or approximately 20 items per millisecond.

    The best construction and replace it is running hundreds of times slower, and it is perhaps running ~ 1800 x slower.

    Here's my problem:

    One of these things is 1800 x slower than others.  Why is it reasonable?  Why is-111 x reasonable?  Here are the simple changes.

    I love that LabVIEW is literally 1000 x faster than MatLab in certain tasks.  I need to understand why, in some cases this multiplier 1000 x falls down to a 2. 4 x DECREASE.  Intuition I have is not only wrong, it's incredibly bad.  He's wasting the 1000 x multiplier of speed that I am very happy with.

    My thought:

    If I did it in assembler to nickname the first loop is as follows.

    I point to the stack, call the random number generator to get a value on the stack, incrementing my counter, check if it's 10 million, update my pointer location and iterate.

    The second loop would be as follows:

    Point battery, I write a zero, incrementing my counter, test whether it is 10 million, update my pointer location and iterate.

    then

    I will return to the beginning of the location of the stack, call the generator of random numbers to get a value on the stack, incrementing my counter, check if it's 10 million, update my pointer location and iterate.

    The report of the runtime for loops would be the time difference of calculation-writing-increment of a (pseudo) random number and THEN a zero against writing incrementing from zero.  I expect it to be somewhere between 2 x and 10 x.

    There are BONES.  Perhaps the algorithm to calculate a random number has many steps, like thousands.  Here is the difference between On-die, L2, RAM and disk.  Given enough items I would expect things to have to go through the bottlenecks and get slow.

    You have to shift registers when using him in place element structure. I don't know why, but it is much faster (and a more exact comparison) when you use the shift register.

  • 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

  • By comparing the matrix elements

    Hello to all 2!

    I have the following problem:

    I have a matrix, where 'I' is the index lines and 'j' is the index of the column.

    I want to see if the elements of the matrix that are located below the diagonal are equal to zero.

    How can I achieve this?  Any ideas?

    Thank you 4 your time!

    In fact, I just assumed you wanted the first lower secondary diagonal instead of the triangular matrix.   Now, you're stuck with indexing.

    This is version 8.2 as well.  After the loop to the upper triangular part more diagonal will reset automatically, if all elements are zero, then you know the lower triangular part sucked.

  • Index of the markers of the Viewer?

    In the index of the timeline, you can see the list of markers in the timeline. Is it similar to put in markers Viewer?

    mnstudio wrote:

    In the index of the timeline, you can see the list of markers in the timeline. Is it similar to put in markers Viewer?

    Well, sort of... you can set your browser to display the list and twirl the little open triangles.

    You will see all kinds of things, such as Favorites, keywords, etc..

    There is no way I know of to make sure that you only see the markers.

  • My website looks fine in other browsers, but on firefox it arrives as an index with the title first and on the second line it says go to the content. This can be corrected?

    When I look at my site it loads as an index with the heading on the top line and then a link saying "go to content" and then corresponds to the navigation in the chips. I downloaded the latest version of firefox and this did not improve the situation. The site looks very well in other browsers.

    Make sure that you do not block the CSS files on this page.

    Reload Web pages, and ignore the cache.

    • Hold SHIFT and click reload.
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Cmd + Shift + R' (MAC)

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • display the index in the notes not available

    display the index in the notes not available

    explain

  • sorting table, how to get the new index of the last value?

    Hi all!

    I use a Subvi, which adds a cluter of the parameters to an array and then sort this table by one of the parameters in clusters.

    It works very well, with examples, that I found in this forum

    but now, I would like to know if it is possible to obtain at the end of the new cluster index first added.

    See attached VI

    Thank you

    You take the size of the table and insert the new element to this level is anything other than the table of construction and a simple construction would do that.

    In your question, I assume you're asking on the index of the item that you inserted after the sorting of the table, right? In this case, you can compare the cluster element that you introduce to the initial with the cluster table you get after a sorting of the table. This will give you the index of the item that you insert at the start.

  • Search index of the secuence valuation until you reach a constant value table...

    Hello

    I have an arry of secuence RR values (its peak at the time of peak of ECG wave is seconds). I know that the added value of the paintings is the total time of sample data.

    I would like to separate in different charts in the representation of every hour of recorded data.

    I need to get a way to get the index where the number of added values are-online 3600 s (1 h).

    So that I can know the index of the arrays values to get the correct index in chart 1 h values, another index for another hour for an another graph,... so until you get the hourly chart several data can show.

    I hope you understand me.

    Best regards.

    Modulo division is performed by the function Quotient & remains on the digital palette.

    Work with tables and data DBL or integer types.

    When I use the method that Mike designed, in my view, the VI sometimes lacks a time transition. This happens with the simulated data that I generate because it is possible that the rest is different from zero. For example, this can happen if the accumulated sum is 3599.4 s and the next RR interval is 1.3 s. Which gives the following sum = 3600.7 s. The conversion by multiples of the amounts of 3599 and 3601. The remains are 3599 and 1 after modulo division. None are exactly equal to zero.

    I've changed this option to use DBL and then look the big negative transition. The minimum value may be with the largest range of RR in the data. However, there is always a great transition close to 3600 to near zero.

    Lynn

  • Show largest index in the array with the value 'True '.

    Hello

    Is it possible to show the maximum number of index with the value "true", as indicated under?

    I can show the value on what index series of 'real' ends with the function 'Table Max and Min', but when there
    a fake between these True, it shows that the index of the true left of the fake.

    I don't need to know the size of the table, because he must stay 8

    File is attached

    Hi Stef,

    Here you go:

  • Get the current Index of the Ring System

    I need to know the index of the ring box that is currently displayed on the front panel during execution.

    The ring box values do not necessarily correspond to their clues so I can just wire the ring box itself to property [] DisabledItems.

    The way I'm going to get the index of the item "displayed" the control of the ring is as follows:

    A reading in the strings [] property returns an array of strings of the 'Elements' of the order of the ring.

    A reading in the RingtText.Text that returns the string value of the current item displayed in the control of the ring.

    I use the search function to search in the array of strings to the current text, and it gives me the index of the current item displayed in the control of the ring.

    Is there a way to get the index of the currently displayed index of the ring directly control?

    In a Word, no.

    the method that you use is the easiest.  If the srtings are very long, you could unbudle [channels] and property values and this table just to save a few (very minor) research paper.  Keep in mind, control system properties depend on the operating system

  • 'For' loop with a different number of iterations. Second, the auto-indexation of the tables with different sizes is done. It can affect the performance of the Vi?

    Hello

    I have a loop 'for' which can take different number of iterations according to the number of measures that the user wants to do.

    Inside this loop, I'm auto-indexation four different 1 d arrays. This means that the size of the tables will be different in the different phases of the execution of the program (the size will equal the number of measures).

    My question is: the auto-indexation of the tables with different sizes will affect the performance of the program? I think it slows down my Vi...

    Thank you very much.

    My first thought is that the compiler to the LabVIEW actually removes the Matlab node because the outputs are not used.  Once you son upward, LabVIEW must then call Matlab and wait for it to run.  I know from experience, the call of Matlab to run the script is SLOW.  I also recommend to do the math in native LabVIEW.

  • How do I loop stops then automatically indexed table is connected to the index of the loop = 0

    I connected an array of 5 elements of a loop FOR with indexed auto activated (FOR the index of the loop is not no conthe second), IE after iteration 5 0-4 loop ends automatically ... HOW he gets himself finished?

    I have attached the image of refrence

    http://digital.NI.com/public.nsf/allkb/76895DA6D9BFE6B586256F7000745561

    http://CNX.org/content/m12221/latest/

    find the tutorial for how a for loop works decide the Iteration Count When Multiple Auto-Indexed entry bays are present?

  • Extract the matrix element

    I am trying to make the detection of peaks on a waveform. I use the waveform peak detection VI for that. One of the outputs of this VI is a picture of the 'locations' of each peak.

    The table of locations is displayed on the front panel, and it displays each item. I want to be able to extract a specific element of the array, however, say the third element (value = 226). I tried to do by using the table of index function, but I think that my understanding of this feature was incorrect. It seems that this can only isolate an ultrasensitive table 1 d array of?

    I'm sure that the answer is pretty simple, but I'm scratching my head trying to find. Thanks in advance.

    Your contribution is an array of waveforms, so you will get a table of the peaks for each waveform. You check out the first elements, which is a cluster that contains a table of the peaks for the first waveform. (Given that LabVIEW can not have arrays of arrays, you will get an array of clusters, each containing a table 1 d).

    If you have only a waveform in the input array, you must use table index before the detection of peaks and feed only a waveform to get a simple output of table 1 d.

    If you want to analyze an array of waveforms, simply dig a little deeper to the output you get. Array index to get the result of one of the waveforms (that is what you are currently doing!), and then ungroup to get the table of the results of this waveform, then the array index to access the first Ridge.

Maybe you are looking for