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).

Tags: NI Software

Similar Questions

  • How to write a unique number in a single Excel cell

    I'm using Labview 2013 SP1 with the Microsoft Report Builder and I can't understand how to write a number of DP to a specific cell in an Excel spreadsheet. I have no problem writing tables of numbers to specific cell ranges, formatting of cells, the writing of titles, using models, everything I need, except the possibility to write a number to a specific cell. All vi who write the numbers seems to require tables 2D for the entries. I must be missing something, but I think I crossed every vi in the palette of MRG and found nothing.

    Any help/examples were greatly appreciated.

    ... and you probably know that the best way to do it is with build table, twice.

    Note the lines is 'thick' goes from left to right.

    Bob Schor

  • How to divide a large number of documents using Acrobat PDF?

    Acrobat will split a document large mulitple documents.  Not extract but divided.  Also you can delte pages with it?

    Hi servidone,.

    You can defintely it with Adobe Acrobat.  Please visit this page for more information on how to accomplish the tasks you ask on: https://helpx.adobe.com/acrobat/using/manipulating-deleting-renumbering-pdf-pages.html

    -David

  • How to divide a line into several posts based on the period.

    Hello

    I have data from the table like this:

    Project EMP_ID Date_Assignment Date_Expiry EMP_TYP

    P001 1000 1 JUNE 2015 30 JUNE 2015 D

    P001 1001 1 JULY 2015 31 JULY 2015 D

    1002 1 AUGUST 2015 31 AUGUST P001 2015 D

    P001 2000 01 - JUN - 2015 31-DEC-9999 M

    The report of three developers to the Manager during their own lifetime. I want the corresponding duration of Manager for each of them:

    Project EMP_ID Date_Assignment Date_Expiry EMP_TYP

    P001 1000 1 JUNE 2015 30 JUNE 2015 D

    P001 1001 1 JULY 2015 31 JULY 2015 D

    1002 1 AUGUST 2015 31 AUGUST P001 2015 D

    P001 2000 1 June 2015 M June 30, 2015

    P001 2000 July 1, 2015 M July 31, 2015

    P001 2000 31 August 1, 2015-AUG - 2015 M

    P001 2000 M 01-SEP-2015 31-DEC-9999

    For the last span (01-SEPT.-15 to 31 - DEC-9999) there is no developer reporting to the Manager.

    How in Oracle 11 g?

    Post edited by: 2808486

    The date ranges developers will never overlap? If so, what would happen?

    Your desired results can be achieved like this, but I don't think it makes a lot of sense:

    SELECT emp_id, date_assignment, date_expiry, emp_typ

    WCP

    WHERE emp_typ = '

    UNION ALL

    SELECT em.emp_id, ed.date_assignment, ed.date_expiry, em.emp_typ

    Ed, em emp EMP

    WHERE ed.emp_typ = '

    AND em.emp_typ = am'

    UNION ALL

    SELECT em.emp_id, MAX (ed.date_expiry) + 1, TO_DATE (31-DEC-9999 ',' mon-dd-yyyy ""), em.emp_typ

    EMP ed, emd em

    WHERE ed.emp_typ = '

    AND em.emp_typ = am'

    GROUP BY em.emp_id

    ORDER BY 4.2

  • How to divide a variable in 3 of those using the XPath/XQuery functions

    Hello

    do you know if it is possible to divide a (string) variable with this format, var1, var2 > < var3 > in 3 simple variables such as:

    var1;

    var2;

    var3;

    use of XPath/XQuery functions in a project of OSB?

    I found how to get the same result by using an action of legend of java, but I prefer an easier way (if available).

    Thank you.

    Hello

    Take a look at this section of forum...

    https://forums.Oracle.com/thread/1274460

    See you soon,.

    Vlad

  • How to merge my contract number with my existing profile of VMware?

    Hi all

    My company gave me a contract number for more communication with the VMware technical support calls. I just want to know how to add the number of this contract with my existing profile. It would be great, if someone give me a step by step process.

    Thank you

    Ganesh

    Someone in your company should already have a VMware account to manage support contracts. Ask this person to add you as a support administrator (SA) to this contract.

    With contracts just needs to connect to its VMware account, select 'Manage contracts' and click on 'manage administrators '. After you have entered the email address of your VMware account, he or she must give the contract and the role. That's all.

    André

  • How to create a unique page on one side of the other view?

    I have a document that considers the side-by-side, except the first page.  I would like to see unique page and the ability to print a page by page!

    Any help?

    Thank you

    Blue

    Looks like you don't have a side-by-side, as it is normally referred to in Acrobat, but that the PDF file is actually a set of pages that are 2 pages per sheet. To be able to print a page of the worksheet, use the crop tool to select one side (and the same on all the leaves if you select everything). Then print this set. For other pages, simply move the culture across the sheet and repeat. Looks like it's what you're trying to do. If you want a single PDF file with 1 page per sheet, a crude to do this is to print each cropped to new PDF series. Then merge the two sets of printing and then rearrange the pages.

  • How to create a unique temporary table delete automatically after the join?

    I have a lot of users simultaneously accessing web applications.
    My problem is how to fix the SELECT WHERE IN('..') clause ...

    I read a lot of threads with the same option...

    (1) open the connection and start transaction
    2) create temporary table
    (3) Insert (insert batch) data
    (4) the main objective. SELECT JOIN or SELECT WHERE IN (SUBQUERY).
    (5) end of transaction and close the connection

    How can I ensure that the temporary table created was deleting/moving on 5)?

    Thank you very much..

    You can do this by using global temporary tables. Also data from the temporary table is automatically deleted after that validation but the table will remain.

    for example

    CREATE TEMPORARY TABLE global today_sales
    ON COMMIT DELETE ROWS
    AS SELECT * FROM Orders WHERE order_date = SYSDATE;

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14231/tables.htm#i1006400

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_7002.htm#i2153132

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_7002.htm#i2153132

    Concerning
    Rajesh

    Published by: Rajesh on June 10, 2010 15:34

  • Unique number with the manipulation of XML on the 8520 with OS 4.6

    Our application works on many devices with os 4.6 to 7. It's a platform for learning with a function like get server classes and show to the user. This course has the configuration xml file this demand analysis.

    App works fine on all phones, except one, it is 8520 with OS 4.6. In the log file, I see that the issue is part of the analysis of this xml file. Is classic DOM parser but this code works well on all OTHER phones, so the question is not in the format of this file. In addition, we cannot reproduce the developer side with Simulator, this problem only exists on the real phone.

    I guess that this problem is specific for 8520 with OS 4.6 and probably that you encountered with this at the beginning. So if you have the answer or guess it please share it with me. Any help would be apreciated.

    I mislead you.

    His language classic gap between me and my client. We didn't understand, and now this error occurs on many devices. So my question is meaningless.

    Thank you for your help.

  • How to table of waveform of input 1 d in the lock with the amplifier

    I have a LabView application that I have to change to include a lock in the amplifier.  The application uses a capture card of data several times to capture a sample of 0.1 s of two signals (one signal, a single reference) in a laboratory test.  Before the measure was made by the base RMS module to record the VRM in the signal, and the reference is ignored.  However, the measures that I am now the scene run many s a lower and so I would use a simple RECS in the kit OR of.

    I am happy (I think) with the configuration of GARLIC but I am struggling to understand the requirement of input data.  It should be an array of 2D, with the identifited of reference signal.  However, the output of the part of the utility that captures the waveform is a table 1 d of waveform.  Could someone advise me on how to convert the table 1 d of waveform in a 2D table suitable for admission to the GARLIC?

    As you may have guessed that I am a newbie to LabView, I try to modify an application designed and assembled by a former colleague, so I'd appreciate simple suggestions!

    TIA.

    You have separated for each signal waveform 1 d arrays, or do you have a 1-d single waveform chart where signals are separate items in the table? If this is the first, you should do something like the code below. If you have a single Bay, then the code would be similar - you could just use a table of unique Index function. You may or may not need to transpose the table 2D. I don't know what waits for the lock in Subvi - channel data by row or column.

  • How to choose the Department with employees in the same line?

    Hello world

    I need to make this request,

    Suppose we have 2 departments with n used on each Department

    I need to select the departments with only 2 employees in the same line, example here

    Department Name of Department Employee1 Employee2
    10HUMAN RESOURCESMarcSteve
    20HEPaul
    30New Department
    40FinanceJeanMichael

    This query below did not work because it only displays the first employee, but I need to display 2 employees (same as the above table)

    select
    deptno,
    (select ename from emp, dept where rownum =1 and emp.deptno = dept.deptno) employee1,
    (select ename from emp, dept where rownum = 2 and emp.deptno = dept.deptno) employee2
    
    from dept;
    
    

    ...

    I did this, but with the function returning the Emp2Dep1 Emp1Dep1

    function get_ename(p_dept number,p_col number)
    return varchar2
    is
        v_ename varchar2(4000);
        v_first boolean := true;
    BEGIN
            select ename
                  into v_ename
                  from
                      (
                      select ename, rownum as rn
                      from (
                            select ename
                            from emp ,dept
                            where    emp.deptno        = p_dept
                            order by 1 asc
                            )
               
                      )
                  where rn = p_col;       
              
    
         return v_ename;
    END;
    
    

    and simply put

    select
    get_ename(deptno ,1 ) employee1,
    get_ename(deptno ,2 ) employee2
    from dept;
    
    

    Is there a better way to do it?

    NB: database 11g

    Thank you

    Select the Department, employee1, employee2

    (select Department, name, cnt

    (name, department, row_number (select) at the NTC (partition by order of the Department by null)

    employees

    )

    where NTC<=>

    )

    Pivot (max (name) of the cnt (1 as employee1, 2 as employee2))

    order by Department

    DEPARTMENT EMPLOYEE1 EMPLOYEE2
    10 Marc Steve
    20 Paul -
    30 - -
    40 Jean Michael
    50 Alpha Beta

    Concerning

    Etbin

  • Index on non unique values in order to avoid the full table scan

    I have a table with > 100 k records. The table is updated only during the race every night. All columns except one have non - unique values and I am querying the table with this request.

    COL3 - non - unique values - only 40 distinct values
    unique values - no - COL4 - 1000 distinct values
    last_column - 100 k unique values

    Select last_column in the table_name where in (...) col3 or col4 (...)

    I tried to create a Bitmap index individually on col3 and col4 and also combined. However, in both cases, it performs a full table scan.

    Please, help me optimize this query as it is used in the term altogether the system and the cost of the query is very high around 650.

    I don't have much experience with popular indexes then all tracks.

    Thank you
    Sensey

    Published by: user13312817 on November 7, 2011 11:32

    An alternative might be to use a union instead and the 2 index:

    create index my_index1 on my_table (col3, last_column) compress 1;
    create index my_index2 on my_table (col4, last_column) compress 1;

    Select last_column from my_table
    where col3 in (...)
    Union
    Select last_column from my_table
    where col4 (...)

    In other words, if the UNION would apply here whereas in double values for last_column will be deleted.

  • How to divide a circle and the fill color for each individual segment

    I know that sounds easy, sorry I'm pretty new to illustrator.

    I need to divide a circle into 7 sections and then fill each of them individually. I tried the polar grid tool to divide the circle, but I couldn't turn each segment into distinct sections that I could color individually.

    The cirlce does not break upward into segments but creates a number of paths, the outline of the circle is a unique path.

    Does anyone know a quick solution to this? Am approaching this the wrong way? Any help would be GREATLY appreciated.

    Thanks for your time,

    Tony

    You can use the live paint after split.

    are you lookin for?

  • Put a unique number on each form is submitted

    My Department is new to Live Cycle Designer.  We created a PDF using LCD ES form that is used to approve the purchase of certain types of equipment.  I was prompted to change to include a unique identification number, and I need advice on where to start.

    The user goes on the web opens the PDF homologation form, fills out and clicks a button to send (on the form) that fits over the filled PDF an email that is sent to our office.  Once the form comes to us, it must be distributed to the other 4 or 5 oversight offices, and we want to identify each shape with a unique number, so we can monitor his progress.

    So what I was asked to do is to find a way to put a unique number generated automatically on the form at one point before it is emailed to us.  The number may have a number any numbers or characters (for as long as it is readable by humans) and does not need to be sequential.  I think a 5 or 6 digit would be good.

    I thought that the right approach would be to create a small Access database to generate/store identification numbers and then get the form of capture/read a new number every time that you click the submit button.  While I can connect to my database of test very well, what I do understand not how to execute SQL of LCD, or how to do it after the events, as when the form is opened or when the user clicks the submit button.  I didn't see any chance of finding similar good one so far.

    Is this the right way to go, or is there a better way to do it in LCD?

    Thanks for your time,

    -Max

    I created an example showing the various options that are available. Note that if you connect an external source such as a database and your users use player then you have to drive to extend the form using LiveCycle to allow this.

    The file that I was talking about is attached. If you need the process and controls for the DB I mention just ask and I'll post those as well. You will need LiveCycle server for this part.

    Paul

  • How to change the color of each page number in InDesign CC?

    I'm working on a book that has pages with black background and some with white background... I need to know how to change the color of each page number, so that they will be visible on the black background.

    I tried clicking on the page number, cmd + shift click... nothing seems to work. I have all the page numbers on a separate layer, because they were hidden behind the images that I place on each page... I don't know if it's important.

    Any suggestion would be appreciated.

    My best advice is to make a second set of master pages with white numbers and apply them as needed.

Maybe you are looking for