How to pass 1D array into matlab?

1 had 2 1-D array
array1 = 1D array signed 32-bit integer numeric
array2 = 1D array double-precision floating-point numeric
how do i pass this 2 arrays to matlab script??
help....as i'm very new to both labview and matlab.
thks,lyn

LabVIEW has a Matlab Script Node (Programs >> Mathematics >> Formula) that you can use to interface between the two programs. To pass arrays into the script node do the following:
1. Right-click on the left edge and select "Add Input"
2. Give the input a variable name in the termainal that was created.
3. Right click on the terminal and select Choose Data Type >> Real Vector.
You can now wire the 1D array to this terminal. You enter your Matlab Commands as text inside the node and you can create outputs the same way to created inputs.

Similar Messages

  • Using TestStand How I pass an array of data into a DLL (IPC3.dll) for serial communication

    I am ussing a DLL created by another party. I have the list of the C declaretions. I have been able to write a seq that can turn the comport ON/OFF or select a different port but I have not been able to send or recieved any data. I have created an array of bytes(unsigned 8-bit integers)to send and recieved data but nothing goes out or in.

    Hi Toro,
    There is an example in your \Examples\AccessingArrays\PassingArrayParametersToDLL directory that illustrates exactly how to pass TestStand arrays as arguments to dll functions. The source files for the .dll are located in the same directory.
    For more information on passing arrays as parameters to modules you should read the "DLL Flexible Prototype Adapter" section of Chatper 13 in the TestStand User Manual, and pay special attention to the subsection entitled "Array Parameters". You can access the User Manual from the TestStand Start Menu group, the TestStand Sequence Editor's Help menu, the \Doc directory, or online at the following link:
    http://digital.ni.com/manuals.nsf/websearch/50B69DA356B8D38C86256A0000660E6B?OpenDocumen
    t&node=132100_US
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • How to pass an array to a stored procedure

    create or replace package demo_pkg
    as
    type cityArray is table of city%rowtype index by binary_integer;
    procedure city_report( p_inputs in cityArray );
    end;
    CREATE OR REPLACE PACKAGE BODY demo_pkg
    AS
    PROCEDURE city_report (p_inputs IN cityarray)
    IS
    BEGIN
    FOR i IN 1 .. p_inputs.COUNT
    LOOP
    DBMS_OUTPUT.put_line ( 'citycode = '
    || p_inputs (i).city_code
    || ' CITYDESCRIPTION = '
    || p_inputs (i).city_description
    INSERT INTO testing
    (city_code, city_description
    VALUES (p_inputs (i).city_code, p_inputs (i).city_description
    commit;
    END LOOP;
    END;
    END;
    to call that procedure ia m using this
    declare
    my_data demo_pkg.cityArray;
    begin
    my_data(1).city_code := 1234;
    my_data(1).CITY_DESCRIPTION := 10;
    my_data(2).city_code := 4567;
    my_data(2).CITY_DESCRIPTION := 20;
    my_data(3).city_code := 4321;
    my_data(3).CITY_DESCRIPTION := 30;
    demo_pkg.city_report( my_data );
    end;
    but actually the procedure (demo_pkg.city_report)is called from front end(.net).how they will call this procedure in .net invironment

    Hi,
    Your exact question has been asked before, see: http://asktom.oracle.com/pls/ask/search?p_string=How+to+pass+an+array+to+a+stored+procedure
    or do a search on this forum.
    And please use this tag => (yes, just the 4 characters forming the word 'code' between curly brackets)
    *before* and *after* your example to maintain formatting and indentation, it's hard to read now....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to Pass multiple parameter into single store procedure

    How to Pass multiple parameter into single store procedure
    like a one to many relationship.
    it is possible then reply me immediatly

    you mean like this .....
    CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
    BEGIN
    DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
    END display_me;
    CREATE OR REPLACE procedure display_me_2 as
    cnt integer :=0;
    BEGIN
    For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
         display_me(in_param => c1_rec.empno);
         cnt := cnt+1;
         end loop;
         DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
    END display_me_2;
    SQL > exec display_me_2
    Values is .....9999....Default
    Values is .....4567....Default
    Values is .....2345....Default
    Values is .....7369....Default
    Values is .....7499....Default
    Values is .....7521....Default
    Values is .....7566....Default
    Values is .....7654....Default
    Values is .....7698....Default
    Values is .....7782....Default
    Values is .....7788....Default
    Values is .....7839....Default
    Values is .....7844....Default
    Values is .....7876....Default
    Values is .....7900....Default
    Values is .....7902....Default
    Values is .....7934....Default
    Values is .....1234....Default
    Total record count is ....18

  • How to pass int array as an IN parameter to PLSQL Procedure

    Hi,
    How to pass int array in java to a stored procedure througn jdbc
    and what type of data type I should declare to this IN parameter
    in PLSQL Procedure.
    Thanks,
    Simi

    Hi,
    The best way to do what you want depends on what you want.  Start by describing what you need to do.  It's best to post some sample data (CREATE TABLE and INSERT statments) and what results you want from that sample data.  (See the forum FAQ: https://forums.oracle.com/message/9362002)
    If you have ideas about how to do the job (e.g., populating a temporary table) it can be helpful to include those, too, but distinguish clearly between WHAT you need to do and HOW you might do it.
    As Bencol suggested, a SYS_REFCURSOR might be the best way to pass back the results.
    Since you didn't post your table, or even describe what you wanted to do with it, I'll illustrate using scott.emp, which is probably on your system.
    Say you wanted a procedure that took a DATE as an argument, and returned a some designated columns (empno, ename and hiredate in the example below) for all employees hired on or after the given DATE.  You might write a procedure like this:
    CREATE OR REPLACE PROCEDURE  hired_since
    (   start_date  IN   DATE
    ,   out_data    OUT  SYS_REFCURSOR
    AS
    BEGIN
        OPEN out_data FOR
            SELECT  empno, ename, hiredate
            FROM    scott.emp
            WHERE   hiredate  >= start_date;
    END  hired_since;
    SHOW ERRORS
    You can test it in SQL*Plus like this:
    VARIABLE   c REFCURSOR
    EXEC  hired_since (DATE '1982-01-01', :c);
    PRINT :c
    The output I got from this test was:
         EMPNO ENAME      HIREDATE
          7788 SCOTT      19-APR-87
          7876 ADAMS      23-MAY-87
          7934 MILLER     23-JAN-82

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • How to pass vector array to JasperReport

    I have a query looks like this... in my JasperReport. (select * from employee where employee_id = $P{Emp_ID} order by employee_id)
    I already created a vector array contains a list of employee IDs from database. Now, I want to pass the array into the query to get a specific list of employees.
    Similar to SQL prompt below.
    SQL> select * from employee where employee_id in (1,3,4,5,22,23,45) order by employee_id.

    jasontey,
    I'm doing the samething here but with arrays and I'm getting ClassCastException.
    Servlet1:Vector PatientInfoVector = new MdlPatient().getPatientInfo(userId,patientNumber);
    int patientLength = PatientInfoVector.size();
    MdlPatient[] PatientInfoArray = new MdlPatient[patientLength];
    for (int i=0; i<patientLength; i++)
    PatientInfoArray[i] = (MdlPatient)PatientInfoVector.elementAt(i);
    session.setAttribute("patientSession",PatientInfoArray);
    response.sendRedirect(response.encodeRedirectURL("/FsuSecurity/SrvSecurity"));
    SrvSecurity:
    MdlPatient PatientInfo = (MdlPatient)session.getAttribute("patientSession"); This is where I'm getting the ClassCastException.
    int patientNumber = PatientInfo.getPatientNumber();
    Thanks if you can help,
    Doug

  • How to pass an Array to jsp:param

              Hi,
              I am trying to find out how to pass an array to a jsp:param tag abnd then retrieve
              the values in the next page. Please help soon. Thanks
              Here's my code - Assume the books array has more than 1 value
              String[] books = request.getParameterValues("book");
              <jsp:include page="<%=contentPage%>" flush="true">
              <jsp:param name="bookSelected" value="<%= books %>" />
              </jsp:include>
              The 'contentPage' takes me to the next page where I have the following to retrieve
              the value of 'bookSelected'
              String[] bookSelected = request.getParameter("bookSelected");
              I tried accessing the array like this
              if(bookSelected.equals("book1"))
              but did not succeed.
              I tried accessing the array in a loop but it did not work. Here's what I tried.
              <jsp:include page="<%=contentPage%>" flush="true">
              <%for (int i = 0; i<books.length; i++){
              %>
              <jsp:param name="bookSelected" value="<%= books %>" />
              <% } %>
              </jsp:include>
              

    Hi
    tell me how you redirect from __confirmdelete.jsp:__ to deleteServlet.java..
    and post detail code of __confirmdelete.jsp:__

  • How to pass a file into a java method

    I am trying to pass a file into a java method so I can read the file from inside the method. How can I do this? I am confident passing int, char, arrays etc into methods as I know how to identify them in a methods signature but I have no idea how to decalre a file in a mthods signature. Any ideas please ?
    Thanks

    Hi,
    Just go thru the URL,
    http://www6.software.ibm.com/devtools/news1001/art24.htm#toc2
    I hope you will get a fair understanding of 'what is pass by reference/value'.
    You can pass Object reference as an argument.
    What Pablo Lucien had written is right. But the ideal situation is if you are not modifying the
    file in the calling method, then you can pass the String (file name) as an argument to the called method.
    Sudha

  • How  to Pass String array from Java to PL/SQL  and this use in CURSOR

    hi,
    I cant understand how to pass Array String as Input Parameter to the Procedure and this array use in Cursor for where condition like where SYMPTOM in( ** Array String **).
    This array containing like (SYMPTOM ) to be returned from the java to the
    pl/sql (I am not querying the database to retrieve the information).
    I cannot find an example on this. I will give the PL/SQL block
    create or replace procedure DISEASE_DTL<*** String Array ***> as
    v_SYMPTOM number(5);
    CURSOR C1 is
    select distinct a.DISEASE_NAME from SYMPTOM_DISEASE_RD a
    where ltrim(rtrim(a.SYMPTOM)) in ('Fever','COUGH','Headache','Rash') ------- ***** Here use this array element(like n1,n2,n3,n4,n5..) ******
    group by a.DISEASE_NAME having count(a.DISEASE_NAME) > 3 ----------- ***** 3 is no of array element - 1 (i.e( n - 1))*****
    order by a.DISEASE_NAME ;
    begin
    for C1rec IN C1 loop
    select count(distinct(A.SYMPTOM)) into v_SYMPTOM from SYMPTOM_DISEASE_RD a where A.DISEASE_NAME = C1rec.DISEASE_NAME;
    insert into TEMP_DISEASE_DTLS_SYMPTOM_RD
    values (SL_ID_SEQ.nextval,
    C1rec.DISEASE_NAME,
    (4/v_SYMPTOM), --------**** 4 is no of array element (n)************
    (1-(4/v_SYMPTOM)));
    end loop;
    commit;
    end DISEASE_DTL;
    Please give the proper solution and step ..
    Thanking you,
    Asish

    I've haven't properly read through your code but here's an artificial example based on a sql collection of object types - you don't need that, you just need a type table of varchar2 rather than a type table of oracle object type:
    http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/

  • How to pass an array to a subroutine in FXscript?

    Hi,
    I am having problems trying to pass an array to a subroutine in FXscript.  Code segment:
    on TestSub(value x)
    // do stuff
    end
    float i, testarray[256];
    for i = 0 to 255
              testarray[i] = i;
    next
    TestSub(testarray);
    FXscript returns the error "missing close parenthesis".  If TestSub(testarray) is replaced with TestSub(testarray[0]) no error, i.e. if a single value is passed.
    Trying to define the subroutine differently doesn't help, e.g. "on TestSub(value x[255])" or "on TestSub(float x[255])" yields the same error.
    How do you pass an array to an FXscript subroutine?  Or is it not possible?
    Thanks for any clues...

    You are not being quite clear.  If the next frame expects a pointer to a buffer, it cannot be a vi.  Labview has no pointer types.  You must be referring to a Call Library Node which is set up to call a DLL function.  If this is the case, you need to configure the Call Library Node to accept an array of the data type.  Then you can wire the array into the call library node.
    Is this the case, Call Library Node?
    - tbob
    Inventor of the WORM Global

  • How to pass an array of values to  a view criteria

    Hi all,
    How to pass mutiple values as array into a view criteria.I want to search
    based on mutiple values.
    Please help.
    Thanks

    Swapna wrote:
    I have a search panel with mutilselect combobox for attributes "a","b", & "c".
    Based on selction"a" ,I need to filter the comboboxes "b" and "c".
    This's the requirement.I'm not sure that I understand your question. Are you saying that you have three different controls in your UI? Or one control that has three possible values?
    Assuming that you have one control with three possible values, if "a" is selected, does that mean that you want all rows where some column has a value of "a"? Or does that mean that you want all rows where that column does not have a value of "a"? Or does that mean that you want all rows where that column has a value of "b" or "c" (note that the last two may be different if the column allows NULL values).
    What language is your application written in? What framework/ library are you using to access the database? Are you passing a PL/SQL collection of selected values?
    Justin

  • How To Pass an Array from One Frame in a Sequence to a ptr in the next Frame

    I have an array (generated from the "Replace Array Subset" VI) that I
    wish to pass to the next sequence in a frame.
    In this second frame, however, the VI that this data will go into
    expects it as a pointer to a buffer.
    Of course in C, the array name is the pointer to the array itself, but
    apparently this is not the case in Labview..
    because if I wire the output array to the edge of the frame (Blue
    solid blox - "Tunneling'?), and then try to connect
    that blue box in the second frame, to the VI expecting a pointer and
    the wire connection gets broken, and the blue
    solid box goes empty.
    How Can I do this??

    You are not being quite clear.  If the next frame expects a pointer to a buffer, it cannot be a vi.  Labview has no pointer types.  You must be referring to a Call Library Node which is set up to call a DLL function.  If this is the case, you need to configure the Call Library Node to accept an array of the data type.  Then you can wire the array into the call library node.
    Is this the case, Call Library Node?
    - tbob
    Inventor of the WORM Global

  • How to pass a variable into a cfc?

    prior to calling the cfinvoke, I have coding that determins a
    variable "X"
    I need to pass X into a cfc so it can complete the query held
    there.
    So I tried
    <cfinvoke component="A"
    method="AList"
    returnvariable="AResults">
    <cfinvokeargument name="x" value="#X#"
    /></cfinvoke>
    correct so far?
    Now over on the cfc page is where I'm getting stuck
    Inside my cffunction I'm adding <cfargument name="X" />
    But how do I get the value in?

    I don't quite understand your question. Can you rephrase?
    But before all that, bear in mind that one doesn't pass a
    variables into a
    *CFC*, one passes it into a function within the CFC. And as
    with all
    functions, one passes values into the function by passing it
    as an
    argument. But - of course - the function has to be coded to
    expect the
    argument.
    Your own sample code demonstrates this in action:
    <cfinvokeargument name="abbrCode"
    value="#companyAbbrCode#" />
    (NB: lose the trailing slash: this is CFML, not XML).
    So you know how to do that.
    Hence me not quite understanding what you're actually asking.
    Adam

  • How to pass an array which in the jsp to a javascript file

    now i have 2 files: jsp and js(javascript)
    i want pass an array which in the jsp to another file--> js file
    how can i do it ???
    can u give me some related links or some source codes as the references???
    thx

    bcos ....my senior has resigned!!! so i take over his job !!!!!
    depend on the talent and the project ....only that way to implement to whole project !!!!
    but , i had settled it already ....
    it is very simple
    in the middle.jsp
    Collection result = menuManager.getUserRoleMenu(webSessionUser.getGnuserId());
    String menuname[]=new String[110];
    int menucounter=0;
    Iterator vi = result.iterator();
    while(vi.hasNext())
    HashMap hm=(HashMap)vi.next();
    menuname[menucounter]=hm.toString();
    menucounter++;
    int i;
    String tempstr="";
    for(i=0;i<menuname.length;i++)
    tempstr+=menuname[i]+",";
    session.setAttribute("menuname",tempstr);
    %>
    <script language="javascript">
    menu123("<%=tempstr %>");
    </script>
    in the body,js
    function menu123(string123)
    //doing
    so ....through the script --menu123
    i can get the string from jsp to the js!!!!!
    is it very simple, but it spends my 2 days!!!
    i just learn javascript ....about 1 month !!!

Maybe you are looking for

  • VLC player - how do I get it to play consecutively?

    Hi there, I downloaded VLC to play avi-files, but I can't figure out how to make it play several short films consecutively. I'd ilke to not have to open them, one after another.. Can anyone help me? Best regards, charlotte

  • JCO connection for Meta Data fails

    Hi, I have installed the WebAS Preview version with SP9.  I had installed it once and had succesfully configured the JCo connection to my R/3 system.  After I re-installed the WebAS after a <i>system format</i>, I have configured the <b>JCo for both

  • Event when logistic invoice gets in the sys. through EDI with status cod 03

    Hello Gurus, I am trying to find the event that gets triggered when an incoming EDI logistics invoice gets posted/created in system with status code 3 (error status). I know that I can go to transaction SWELS to find the event using event trace. The

  • Font changing into 4 colour.

    Hi all, When i change or alter(adding a ling) a pdf file,which has balck colour font when it was creted,its whole font content becomes 4 colour(CMYK). I was doing this with acrobat professional 4.0,even i tried 5.0 and 6.0,but same problem comes.Oper

  • Error 10403:AO Buffer Config (i just want to command an analog output)

    just wanna command an analog output with a little program using intermediate vi/but when i execute it an error 10403 appears/need sone to help me