How can I restructure an unfavourable 2D array format to 1D?

A surface profilometer we use produces data in text files with five columns with data point ordering by row first; i.e. if you have the following data sample;
1      2      3      4      5
6      7      8      9     10
11    12    13    14    15
Then the data order follows the number order here.  I want to chop up this annoying format into multiple arrays by row (depending on the number of rows = for loop?) then splice them back together as a single column (transpose these arrays then build array?). Help!
Solved!
Go to Solution.

apg504 wrote:
A surface profilometer we use produces data in text files with five columns with data point ordering by row first; i.e. if you have the following data sample;
1      2      3      4      5
6      7      8      9     10
11    12    13    14    15
Then the data order follows the number order here.  I want to chop up this annoying format into multiple arrays by row (depending on the number of rows = for loop?) then splice them back together as a single column (transpose these arrays then build array?). Help!
Once you have a 1D array, the concept of rows and columns no longer exists.
In any case, reshaping is the right thing. Here's what I would do:
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Reshaper.png ‏11 KB

Similar Messages

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • How can I create a variable size array?

    How can I create a variable size array?

    ok then how can i create a new vector object?If you don't know that, you need to go back to your text book and study some more. Or read the tutorial on the basics of Java: http://java.sun.com/docs/books/tutorial/java/index.html
    After reading that you can move on to: http://java.sun.com/docs/books/tutorial/collections/index.html
    Anyway, the answer to your question is, of course:
    Vector v = new Vector();(But you should probably use ArrayList instead of Vector.)

  • How can I inverse the Split 1D Array by recombining the splitting array?

    How can I inverse the Split 1D Array by recombining the splitting array? i.e I have two boolean arrays A and B, and I want them in one boolean array: A array elements followed by B elements (NOT Interleaving)
    Thank you
    Solved!
    Go to Solution.

    Thank you Marcus_Körner , GerdW and thoult for your assistance.
    Sorry I am using Labview 2013, so I saved it in ver 2010 format, and I uploaded a photo for the circuit.
    Attachments:
    Packets.vi ‏8 KB
    Untitled.png ‏5 KB

  • How can i retrieve missing element in array

    how can i retrieve missing element in arrays if array length is exceeded

    Not sure about what the question means, but could it be that OP is not aware that the first element in an array is at index 0 (not 1) ?
    <a href="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html" style="background:url(http://java.sun.com/docs/books/tutorial/figures/java/objects-tenElementArray.gif) no-repeat; width:400; height:145;"></a>

  • How can i save a data in text format

    how can i save a data in text format in labwindows cvi
    Message Edited by Tikoy on 04-14-2010 11:30 PM
    Solved!
    Go to Solution.

    Hi,
    If your data is in an array, the easiest way is to use the ArrayToFile function.
    It automatically creates a file and puts your data in it according to the format you provide.
    If you have individual samples that you need to write once in a while, you can either collect them into an array and then use ArrayToFile or open a file with fopen and write them as they are acquired with fwrite.
    Hope this helps, 
    S. Eren BALCI
    www.aselsan.com.tr

  • Converting an MP3 to WAV -- How can I convert an MP3 to wav format, 16 bit

    How can I convert an MP3 to wav format, 16 bit, 44,1 khz? I like the program Switch which I know can convert MP3s, but how to I set it up for the specific settings that I need?

    Just import into a logic session. Then bounce at the specs you require. Logic or Waveburner, iTunes and even Quicktime I think can each do this easily.
    A question though. I am assuming you are converting an MP3 to 44.1/16 bit just so you can play the file in a consumer quality CD player?? IF so - that makes sense.
    But if you are doing this because you think it will improve the sound quality of your MP3, I will save you some time here. It won't improve the sound quality at all. It will just turn the MP3 into a larger audio file.
    44.1/16 bit resolution enables you to have a much better sounding file than MP3 formats, but not by going at it this way.
    No offense to you if you know all of this already. I am assuming that you may not know this - because if you did you would also likely know how to convert an audio file.
    Cheers
    Darrell

  • How can I export the universe  to CSV format in Rational      (java)

    How can I export the universe to CSV format in Rational ,please give me one demo .thanks!!

    There's no direct access to an Universe from Java - Universes do have an SDK, but it's COM-based.
    If what you want is to retrieve data from the Universe, what you can do is create a Web Intelligence document reporting off that Universe, create a Query with the data you want from the Universe, then use the ReportEngine (REBean) SDK to retrieve the ResultSet from the Query - note that there's no CSV export option, so you'd have to walk through the ResultSet and write to an CSV yourself.
    Sincerely,
    Ted Ueda

  • How can I copy/paste without copying the formatting?

    How can I copy/paste without copying the formatting? For example, if I copy a sentence from a website and paste it on text editing program, it copies all the formatting as well. How can I turn that off?

    There is an app called "No Formatting" in the App Store. It is simple and works perfectly - it strips formatting from paste (Ctr-V). I needed it for Word and Excel, which don't have keyboard shortcuts for this. It can be toggled on and off from the Menu Bar.

  • How can I take minutes from mysql date format

    how can I take minutes from mysql date format??
    example 10:30:00 is stored in my sql and I want to create 3 variables which will store hours, minutes and seconds..
    Cheers..

    "use application date format" is the choice you want.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How can i record from radio to mp3 format?

    How can i record from radio to mp3 format?
    because i want to record a radio program, and save it, how can i do it?

    If you can, the instructions will be in the user manual - iPod Manuals

  • How can I add a video in vlc format in power point?

    How can I add a video in vlc format in power point?

    Are you using a folder system to organize your music?

  • How can I put data in an array which will be used in SPC plotting

    In my program, it will generate data continuously and I would like to store these data time to time in an array. Could you suggest me a method?
    For example, 1.77,1.67,1.56,1.89,1.99... (these data generated continuously)
    1st second: 1.77 1.67,1.56,1.89,1.99( store in array)
    After 1 second: 1.67,1.56,1.89,1.99,1.33 (remove the first one data in the array and replace it with the following generated data)
    How can I remove the data in the array and replace it with the other data?
    Could you give me some examples?
    Thanks

    Check the attached VI. It includes two methods. You can choose the one you like. I prefer the bottom one because only one extra memory for the subarray is created. The top one makes two copies because of the resize.
    Joe
    Attachments:
    Simple_Numerical_Que.vi ‏26 KB

  • How can I use two single-dimensional arrays-one for the titles and array

    I want to Use two single-dimensional arrays-one for the titles and one for the ID
    Could everyone help me how can i write the code for it?
    Flower
    public class Video
    public static void main(String[] args) throws Exception
    int[][] ID =
    { {145,147,148},
    {146,149, 150} };
    String[][] Titles=
    { {"Barney","True Grit","The night before Christmas"},
    {"Lalla", "Jacke Chan", "Metal"} };
    int x, y;
    int r, c;
    System.out.println("List before Sort");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);
    System.out.println("\nAfter Sort:");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);

    This is one of the most bizarre questions I have seen here:
    public class Video
    public static void main(String[] args) throws Exception
    int[] ID = {145,147,148, 146,149, 150};
    String[] Titles= {"Barney","True Grit","The night before Christmas", "Lalla", "Jacke Chan", "Metal"};
    System.out.println("List before Sort");
    for(int i = 0; i < Titles.length; i++)
       System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles);
    System.out.println("\nAfter Sort:");
    for(int i = 0; c < Titles.length; i++)
    System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles[i]);
    Generally you don't use prefix (++c) operators in you for loop. Use postfix (c++).
    Prefix means that it will increment the variable before the loop body is executed. Postfix will cause it to increment after.

  • How can i convert object to byte array very*100 fast?

    i need to transfer a object by datagram packet in embeded system.
    i make a code fallowing sequence.
    1) convert object to byte array ( i append object attribute to byte[] sequencailly )
    2) send the byte array by datagram packet ( by JNI )
    but, it's not satisfied my requirement.
    it must be finished in 1ms.
    but, converting is spending 2ms.
    network speed is not bottleneck. ( transfer time is 0.3ms and packet size is 4096 bytes )
    Using ObjectOutputStream is very slow, so i'm using this way.
    is there antoher way? or how can i improve?
    Edited by: JongpilKim on May 17, 2009 10:48 PM
    Edited by: JongpilKim on May 17, 2009 10:51 PM
    Edited by: JongpilKim on May 17, 2009 10:53 PM

    thanks a lot for your reply.
    now, i use udp socket for communication, but, i must use hardware pci communication later.
    so, i wrap the communication logic to use jni.
    for convert a object to byte array,
    i used ObjectInputStream before, but it was so slow.
    so, i change the implementation to use byte array directly, like ByteBuffer.
    ex)
    public class ByteArrayHelper {
    private byte[] buf = new byte[1024];
    int idx = 0;
    public void putInt(int val){
    buf[idx++] = (byte)(val & 0xff);
    buf[idx++] = (byte)((val>>8) & 0xff);
    buf[idx++] = (byte)((val>>16) & 0xff);
    buf[idx++] = (byte)((val>>24) & 0xff);
    public void putDouble(double val){ .... }
    public void putFloat(float val){ ... }
    public byte[] toByteArray(){ return this.buf; }
    public class PacketData {
    priavte int a;
    private int b;
    public byte[] getByteArray(){
    ByteArrayHelper helper = new ByteArrayHelper();
    helper.putInt(a);
    helper.putInt(b);
    return helper.toByteArray();
    but, it's not enough.
    is there another way to send a object data?
    in java language, i can't access memory directly.
    in c language, if i use struct, i can send struct data to copy memory by socket and it's very fast.
    Edited by: JongpilKim on May 18, 2009 5:26 PM

Maybe you are looking for

  • Images going bad

    Hello, I have an image for a web site. Its too bib as it is but when I reduce it in size it loses it crispness and it becomes all jagged. I tried saving as Png and using the smooth option in the library properties of the image when I do its looks smo

  • ICal alerts keep using an old e-mail address

    I recently changed my ISP, which changed my e-mail address. I have been sending reminder e-mails alerts to myself so the event will not be forgotten or overlooked. I have deleted the old e-mail address from my address book and e-mail accounts and I h

  • Acrobat changes footer from the original word doc

    Hi, when I convert a Word document to a PDF the footer keeps changing to the file name and not the original footer. Can someone tell me how to stop this. Thanks

  • My ipad2 doesn't play sound on most games and apps, what did i do?

    I have no sound on most games and apps. But I have sound on pandora and a few others. What's going on here?

  • Urgent:Validation

    Hi am entering a range of vendor  while checking, it must display the particular vendor alone is invalid not the whole set of vendors which is entered .How should i declare?