Need to convert a 2D array into two 1D arrays to be fed into Build XY Graph

Hi Need to convert the 2D Output of a sub vI for display on XY Graph. Help!!! I cant find an array function that takes a 2D input and un-builds to 2 * 1D arrays

Hi Dave,
if it is working than that's it.
I'm using the german version of LabView and it is sometimes difficult to translate the names ;-)
Stephan

Similar Messages

  • How to copy data in text file into two-dimensional arrays?

    Greeting. Can somebody teach me how to copy the input file into two-dimensional arrays? I'm stuck in making a matrix with number ROWS and COLUMNS according to the data in "input.txt"
    import java.io.*;
    import java.util.*;
    public class array
        public static void main (String[] args) throws FileNotFoundException
        { Scanner sc = new Scanner (new FileReader("input.txt"));
            PrintWriter outfile = new PrintWriter("output.txt");
        int[][]matrix = new int[ROWS][COLUMNS];
    }my input.txt :
    a,b,c
    2,2,1
    1,1,1
    2,2,1
    3,3,1
    4,4,1
    5,5,1
    1,6,2
    2,7,2
    3,8,2
    4,9,2
    5,10,2

    import java.io.*;
    import java.util.*;
    public class array {
        public static void main(String[] args) throws IOException {
            FileInputStream in = null;
            FileOutputStream out = null;
    try {
        in = new FileInputStream("input.txt");
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String line = null;
        while ((line = reader.readLine()) != null) {
            String split[]=line.split(",");
    catch (IOException x) {
        System.err.println(x);
    } finally {
        if (in != null) in.close();
    }}}What after this?

  • Variable number of two dimensional arrays into one big array

    I have a variable number of two dimensional arrays.
    The first dimension is variable, the second dimension is always 7.
    i.e.:
    Object[][] array0 = {
    {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"},
    {"alice", "smith", 42, 160.0, "la", "bub", "[email protected]"},
    Object[][] array1 = {
    {"john", "sdfs", 34, 15.5, "a", "bl", "[email protected]"},
    {"joe", "smith", 42, 16.0, "a", "bub", "[email protected]"},
    Object[][] arrayi = ...I'm generating these arrays with a for-loop:
         for (int i = 0; i < filter.length; i++) {
              MyClass c = new MyClass(filter);
              //data = c.getData();
    Where "filter" is another array which is filled with information that tells "MyClass" how to fill the arrays.
    "getData()" gives back one of the i number of arrays.
    Now I just need to have everything in one big two dimensional array.
    i.e.:Object[][] arrayComplete = {
    {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"},
    {"alice", "smith", 42, 160.0, "la", "bub", "[email protected]"},
    {"john", "sdfs", 34, 15.5, "a", "bl", "[email protected]"},
    {"joe", "smith", 42, 16.0, "a", "bub", "[email protected]"},
    Any idea on how to accomplish this? It's blowing my mind right now.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Just brainstorming here:
    Why not put your actual data in a class and store that in a LinkedList (so you know the total number of elements for your multi-dimensional array). Then initalize your multi-dimensional array and populate it? Haven't tested the following, but thinking something along the lines of
    public class MyData {
         //data here
         public Object[] toArray() {
              //something similar to this
              return new Object[] = {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"};
    LinkedList<MyData> data = new LinkedList<MyData>();
    data.add(mydata1);
    //however many times you need
    Object[][] arrayComplete = new Object[data.size()][7];
    for(int i = 0; i < data.size(); i++) {
         arrayComplete[i] = data.removeFirst().toArray();
    }Another option for knowing how many rows you would need might be using something like:
    int rows = 0;
    rows += array1.length;
    rows += array2.length;
    //etc...But is not entirely useful if you don't know how many variable arrays you have (although reflections might help if the name of the array variable is incremented systematically, someone told me earlier to avoid reflections since it could make debugging a LOT more difficult).
    Edited by: bogdana on Apr 1, 2010 10:38 AM

  • Why do I need to convert QT movies for my ipad2?

    Why do I need to convert QT movies for my ipad2?

    Becuase the iPad only reads certain video formats you will need to convert them.
    But luckily you can drag your video files into iTunes and select the iTunes menu command (from the Advanced menu) to convert the file into a iPad/AppleTV comatible format. Easy.

  • How to convert Resulset to two dimenson array

    Hello,
    I have a Resulset, i want to store it in 2 dimenson array, but i can't.
    so I store the resulset in Vector:
    Vector row = new Vector();
    ResultSet rs = stmt.executeQuery(sql);
    ResultSetMetaData meta = rs.getMetaData();
    int colCount = meta.getColumnCount();
    while(rs.next()){
    String[] records = new String[colCount];
         for(int i=0; i<colCount; i++){
              records[i] = rs.getString(i+1);
         row.addElement(records);
    However i don't know to convert this Vector to two dimenson array.
    Can you help me:
    1. store the resulset to two dimenson array
    2. or convert the vector that store the resulset to two dimenson array

    The problem with storing the result into a two dimensional array directly is that you don't know the size required for the dimensions of the array, so you need to use something that is dynamic ( like a Vector, or a better use would be an ArrayList if you didn't need the container to be thread safe ).
    I might suggest something like this:
    ArrayList list = new ArrayList();
    ResultSet rs = stmt.executeQuery(sql);
    ResultSetMetaData meta = rs.getMetaData();
    int colCount = meta.getColumnCount();
    while(rs.next()){
    String[] records = new String[colCount];
    for(int i=0; i<colCount; i++){
    records[i] = rs.getString(i+1);
    row.add(records);
    String[][] resultArray = new String[ list.size() ][ colCount ];
    for ( int i = 0; i < list.size(); i++ ) {
        resultArray[ i ] = (String[])list.get( i );
    }

  • Need to convert 'My thoughts' app work into either .jpeg or .pdf

    Hi,
    I need to convert a piece of work, designed through 'My Thoughts' app into either a .jpeg or .pdf format in order to send to Staples to have it printed off - have clicked on save but these two options are not included ... any ideas?
    Thanks in Advance

    I don't have "My Thoughts" but you should be able to command-P and then at the bottom of the print screen you'll see PDF and you can just save as PDF from there.
    All of my printers (including Staples) require PDF documents these days.
    Clinton

  • Combining two StringBuffer array elements into a single array element

    I just need to know how to combine two stringBuffer array elements into one
    StringBuffer ciphertext [] = new StringBuffer[2];
              StringBuffer s0 = new StringBuffer("11011111111110001001101110110101");
              StringBuffer s1 = new StringBuffer("00010011001101000101011101111001");
              ciphertext[0] = s0;
              ciphertext[1] = s1;
              ciphertext[2] = ciphertext[0].append(ciphertext[1]);I get an array index out of bounds exception:2
    Thanks

    StringBuffer ciphertext [] = new StringBuffer[3];  // legal index values are: 0,1,2

  • Need to convert a long into a string, please

    hi there
    i need to convert a long into a string. can i just cast it like this:
    (String)longNumber = some function that returns a long;

    Why not just use Long.toString()? If you start with a long value, you can create a Long object and get it's value as a String.

  • Need to Convert Comma separated data in a column into individual rows from

    Hi,
    I need to Convert Comma separated data in a column into individual rows from a table.
    Eg: JOB1 SMITH,ALLEN,WARD,JONES
    OUTPUT required ;-
    JOB1 SMITH
    JOB1 ALLEN
    JOB1 WARD
    JOB1 JONES
    Got a solution using Oracle provided regexp_substr function, which comes handy for this scenario.
    But I need to use a database independent solution
    Thanks in advance for your valuable inputs.
    George

    Go for ETL solution. There are couple of ways to implement.
    If helps mark

  • Need to convert values into coma separated

    Need to convert values into coma separated
    I have a string value that stores data like 'NYK,IND,SGP,GER'
    FOR EXAMPLE
    V_CITY_CODE = 'NYK,IND,SGP,GER'
    When I query
    select * from city where city_code = V_CITY_CODE;I get no rows, this is because V_CITY_CODE has all city code as single code.
    I need a function to search , and replace with ','.
    I tried using instr and replace but was unable to convert it.
    could some one pls assist me.
    thanks in advance
    Saz

    Looking for this?
    SQL> select * from emp
      2  /
         EMPNO     DEPTNO ENAME                                 SAL DOJ       JOB
             1          1 Karthick                               80 03-DEC-11
             2          1 Karthick_1                             90 23-NOV-11
             3          2 Ram                                    80 03-DEC-11
             4          2 Ram_1                                  90 23-NOV-11
    SQL> var v_ename varchar2(1000)
    SQL> exec :v_ename := 'Karthick,Karthick_1'
    PL/SQL procedure successfully completed.
    SQL> select *
      2    from emp
      3   where ename in (
      4                     select regexp_substr(val, '[^,]+', 1, level)
      5                        from (select :v_ename val from dual)
      6                    connect by level <= length(val) - length(replace(val, ','))+1
      7                  ) 
      8  /
         EMPNO     DEPTNO ENAME                                 SAL DOJ       JOB
             1          1 Karthick                               80 03-DEC-11
             2          1 Karthick_1                             90 23-NOV-11

  • Need to convert music videos that are tagged as "Movies" and re-rag them as "Music Videos" to get them out of my movies library and into the Music Video folder. Likewise, I ha e some educational videos that belong in "Podcasts." Help?

    Need to convert music videos that are tagged as "Movies" and re-rag them as "Music Videos" to get them out of my movies library and into the Music Video folder. Likewise, I have some educational videos that belong in "Podcasts." Help?

    Select/highlight the ones that you want to change in your iTunes library, do Get-Info (control-I) and change their Media Kind on their Options tab to 'Music Video' - and then similarly for the podcasts.

  • Can I plug my iPad into an outlet in France for recharging, or do I need a converter (besides de adapter...)?

    Can I plug my iPad into an outlet in France for recharging, or do I need a converter fo the voltage?

    No converter needed, just an adaptor

  • I need to convert hundreds of TRANSPARENT PDFs into PNG or TIFF

    I need to convert hundreds of TRANSPARENT PDFs into PNG or TIFF. 
    That's not possible with Acrobat. It’s possible to convert hundreds of PDFs into PNG or TIFF using batch processing. But transparency is LOST! 
    Photoshop is the only software I know of which is able to keep transparency when converting from PDF to PNG.
    But now I have problems to get batch processing running.
    I made an Action with “Open file”, “Save as PSD” and “Export to PNG”. 
    Using this Action in batch-process-files with source as a folder with many PDFs and target as a different folder results in many opened PDFs within Photoshop. Nothing else happens:-(. 
    Any ideas? 
    Thanks
    Norbert

    Great:)
    It worked at once.
    Thank you so much for this link.
    Best regards
    Norbert

  • I create name plaques using TypeStyler, but my laser cutter says they must be converted into two vector files; a cut file to cut the outlines of all the letters and an "etch" to etch the letter intersect lines.  Can AI convert my TypeStyler file into a cu

    I create name plaques using TypeStyler, but my laser cutter says they must be converted into two vector files; a cut file to cut the outlines of all the letters and an "etch" to etch the letter intersect lines.  Can AI convert my TypeStyler file into a cut file and an etch file?

    Thanks. I might use it soon...
    Does it automatically make folders named after the volume labels? And does it handle the conversion of spaces and non-alphanumeric characters to octal codes?
    I could read the script but it would be faster for everyone reading, if you leave the answer as a reply.
    I also think that there should be some major work done on modernizing the fstab, either by replacing it with a better implementation of file system mounting or changing the file structure and adding in better handling of non-alphanumerics. I don't want to have to look up a stupid octal table every time I type in my labels.

  • Can Apple TV be plugged into 220v? Or do I need a converter?

    Can Apple TV be plugged into 220v? Or do I need a converter?

    it just need a ac plug converter or another cable it's a pretty std cable my playstation2 and our cd player use the same cable just in black

Maybe you are looking for