Transpose a 1-D array?

The picture is pretty self explanitory, the "build array" takes those 4 input arrays and puts them one after another horizontally.
My problem is that the 4 arrays going into the "build array" are single row, but i need them to be single column.  The "transpose 2-D array" function obviously only works for 2-D arrays, so it won't help me.  Is there a way to rotate those arrays 90 degrees so all the data is in a single column instead of a single row?
Solved!
Go to Solution.

Let me try and give some more info
Yes Ben, that is the idea, it SHOULD be a 2D array (not because that is what the input on the write to measurement file is, but because that is what the program call for). 
Posting the vi itself is a little bit of trouble since there are multiple levels of sub.vis and the problem is not with the preformance, just on how the data is handled at the top level.  (And the auto indexing tunnel is not an auto indexing tunnel, it is just set to "use default if unwired" so i can't rotate it. Granted, this you would have been able to see if I posted the real .vi and not a pic).
All I need is to rotate/transpose the 4 arrays going into the "build array" so that I can have 4 columns to match the frequency, control, cable, and difference string headers, but instead of arranging them as 4 seperate columns of data, they start out as 4 seperate rows of data and are placed in sequence, so I end up with 1 gigantic row of un-sorted data.

Similar Messages

  • Transposing data in an array using a For Loop

    I am trying to transpose some data in an array using a  for loop starting from the size of the array then decrement down to 0. Can someone please help if you have an example?
    Solved!
    Go to Solution.

    I feel as if reverse 1D array may help
    Edit: misunderstood what your second post meant.
    CLA, LabVIEW Versions 2010-2013

  • How can I save 3 of 1D arrays into excel file neatly? VI file is attached. Thanks...

    I have 3 of the 1D arrays. When I combine them, I get 1 very long column in excel. Instead I want to have three columns of shorter arrays. I attached the vi. Besides, is there any way I can write on the 1st row of the same excel file.
    Attachments:
    Ali_PID_Control_Loop_10_formula_frontpanel.vi ‏132 KB

    There's more than one way to "combine" arrays.
    Look at the BUILD ARRAY function.
    If you wire three arrays to three inputs, you have a choice of outputs:
    You can CONCATENATE the inputs, in which case the output is a longer 1-D array.
    If you DON'T concatenate them, the output is a 2-D array, which sounds like what you want.
    You will probably want to TRANSPOSE the 2-D ARRAY, as this will give you three columns of N rows. Without transposing, you get three rows of N columns.
    If the original arrays are not equal length, they will be padded with zeroes.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Evaluations array formulas are incorrect (!/?)

    Hi!
    I'm working on a spreadsheet to return MULTIPLE corresponding values for ONE Lookup Value.
    Consider the table array ("A2:C14"), in which you want to lookup the value "A" in column A which has multiple occurrences, and return all corresponding values in column C.
    The complete formula is not the issue.
    I know and have used it in Excel. It's woks in Excel.
    The problem is that Numbers has returned inconsistent results in portion of the formula.
    The entire formula would be =INDEX($C$2:$C$14, SMALL(IF($B$2=$A$2:$A$14, ROW($A$2:$A$14)-ROW($A$2)+1), ROW(1:1)))
    Formula Part =IF($B$2=$A$2:$A$14, ROW($A$2:$A$14)) would evaluates to: {2, FALSE, FALSE, 5, FALSE, FALSE, 8, 9, FALSE, 11, FALSE, 13, FALSE}, wherein the numbers 2,5,8,9,11,13 indicate the worksheet row numbers containing "A".
    However, The following value is returned:
    {2,FALSE,FALSE,2,FALSE,FALSE,2,2,FALSE,2,FALSE,2,FALSE}!
    Note the results of ROW($A$2:$A$14)): {2,2,2,2,2,2,2,2,2,2,2,2,2}. What's happened to the ROW Function?
    The formula results should be {2,3,4,5,6,7,8,9,10,11,12,13}!
    Is not the ROW Function in Numbers an array function?
    I'm using Numbers 3.0 and OSX 10.9

    Sorry, it's not help.
    Numbers 3.0 supports array functions.
    From http://help.apple.com/functions/mac/4.0/#ffa59b4edb
    INDEX
    The INDEX function returns the value in the cell located at the intersection of the specified row and column within a collection of cells or from an array returned by an array function.
    "array function
    Here are some examples of array functions:
    =FREQUENCY($A$1:$F$5,$B$8:$E$8) returns an array of values, based on specified intervals.
    =INDEX(FREQUENCY($A$1:$F$5,$B$8:$E$8),5) would return the fifth value in the array returned by the FREQUENCY function.
    =TRANSPOSE($A$1:$E$3) returns an array containing the transposed values in the array $A$1:$E$3."
    I questioned the result of the function ROW.  Is there a bug or simple limitation?

  • 3D Map - Color Code and Cursor Tracking

    Hi, I need some help trying to implement some user interface functionality for a program I am developing.
    This will be a tuning tool for automotive ECU. The program will be reading in two signals (Y-axis is RPM, X-Axis is manifold pressure) and use a 2D interpolation to output a Z value to be used in a calculation. There are two pieces I'd like to add to this. 
    1. Color code the cells based on the cell value in relation to the max and in of the entire 2D-Array
    2. Have a live currsor that tracks the current cell of the 2D array and highlights the cells that are being used in the interp calculation so it makes it easier for the user to make changes and calibrate the tables. 
    3. BONUS: An easy way to be able to select a range of cells and increment them by a set amoun or scale them all by an imput amount (like scale range by 90%).
    Basicly, I'd like to recreate some of the user interface functionality of the software shown below in the second picture and the video linked below. 
    VIDEO:    https://www.youtube.com/watch?v=OkVUJCy0sJ4
    VIDEO:   https://www.youtube.com/watch?v=oeZc-ka6ago      (at 16:45 you can see a good example of the currsor tracking through the cells as teh two inputs change)
    -As you drive and the RPM and loading changes there is a blue ball that tracks on the table the current x-y location of the 2D map and the four coresponding cells around the ball are highlighted to show witch of these cells are being used in the calculation so the user can easily alter these cells in real time to tune the output he is looking for. I'd like to be able to highlight, or blink either a single cell closest to the current value, or the 4 corners around it and have it update real time as the user drives the car. 
    Any ideas of how to implement this kind of functionality? The current VI is attached. I should note the x-array and y-array won't necessarily always be constant spacing between cells.
    Thank you for any help in advance!
    Attachments:
    3D Map Color Coded & Currsor.vi ‏17 KB

    Okay, so I made some progress on this. I was able to use an intensity graph to visually color code the relative position of the cells. Is there a way to make the 2D array translucent and overlay the color array intsity graph behind it? is there a better way to do this. 
    I was able to get the closest current cell value to update as black and track around live on the intensity graph. I did this by temporarily setting the cell's value to 0. Is there a way to somehow highlight the actual cell on the 2D-Array instead? 
    The code is attached. I added a random sine wave input to simultate some signals for the x and y input. The Y array now runs in reverse order which made it tricky to get some of the functions to work properly so I had to use a 2D transpose and 1D reverse array to get it back in the right form. There's probably a better way to do this. 
    Any help is great appreciately and rewarded with Kuddos!  
    Attachments:
    3D Map Color Coded & Currsor (Rev B).vi ‏33 KB

  • Any idea how to send stereo 8 bit data to SO write.vi and make it work?

    I have two sine wave.vi's generating two different tones, I need to send them as stereo to the SO Write.VI and create left and right tones to someones ears.
    Attachments:
    Stereo_Test_[1].llb ‏303 KB

    You're almost there. You just need to transpose your stereo 2d array. See attached screenshot.
    Tim
    Attachments:
    transpose_2d_stereo.gif ‏4 KB

  • Allocating enough memory to open a large data file

    Hello,
    I am currently running an experiment which requires me to collect data at a very high rate, creating enormous data files. At first, I ran into the problem of LabVIEW not having enough memory to save all of the data to the hard-disk at once (it seeme to have no problem with a huge array during data collection, only when it went to save it to a file), so I programmed LabVIEW to only save 100000 samples at a time. This seemed to work fine, and I was able to collect a 550MB data file in this way. However, now that I would like to analyze that data, LabVIEW can't read the data from the file into an array, giving me the same insufficient memory errors as before. My system has 3GB of memory, so in theory LabVIEW should be able to get enough to open it, however Windows doesn't seem to want to allocate what it needs. Is there any way that I can override windows and allocate enough memory to LabVIEW for it to be able to open this file and work on the data?

    BrockB wrote:
    The data is all in a 2xN tab-delimited array, and I'm using the 1d array output of the "read from spreadsheet" vi, as I only need the first of the two columns. What I meant to say earlier was that I would still have to read all of the data from the file first if I wanted to break it up into pieces to use later. Labview seems to get stuck on reading the data from the file, not actually on opening it. It also seems like breaking the data up would be a much bigger hassle than just allowing labview to use more of the 3GB that I have available (most of which is sitting unused anyway).
    First of all, any ASCII formatted file is an extreme waste of space and comparatively expensive to write and read. It is only recommeded for small files intended to be later read by humans.
    "Read from Spreadsheet file" must first internally read the entire file as a string, then chop it up looking for tab and linefeed characters, then scan the parts into DBL. If you want the first column (instead of the first row), it then also needs to transpose the entire 2D array, requiering another copy in memory. As you can see, you'll easily have quite a few data copies plugging up your RAM. ("Read/Write from/to spreadsheet file" are plain VIs. You can open their diagram to see what's in there. )
    For datasets this size, you MUST use binary files. Try it and your problems will go away.
    Message Edited by altenbach on 11-11-2008 12:06 PM
    LabVIEW Champion . Do more with less code and in less time .

  • How do create an analog signal from a text or binary file?

    I'm trying to output an analog signal from a file on an NI-DAQ 6251 card using labview 8.5. I've found the examples on building a waveform, but I'm stuck at how to read a text file and make a 1-D array to input my amplitudes into the buildwaveform.vi and I can't find any information on how to do so. Any help or direction is greatly appreciated.
    thanks,
    David
    Solved!
    Go to Solution.

    If all that you want in the file is the Y values, then a text file with a value on each line could be read. The Read From Spreadsheet File can be used. It will return a 2D that you can then use the index array function to get a column or if you select Transpose, the returned 1D array would be used.
    If you want to create an example, use a 1D array constant in a VI and pass it to the Write to Spreadsheet File.

  • 3D Map Management

    Hey i was wondering if someone could show me a tutorial of how you could import a 3D map from like a 3D programme 3D studio Max and how you would manage where it and objects that you programme in the game go in java..
    basically how would you import a 3D map into java and how would you make different objects and assign them to a 3D modeled object.. i know you import the made 3D object as obj. but how to transfer and manage in java..
    ................................................................................................

    Okay, so I made some progress on this. I was able to use an intensity graph to visually color code the relative position of the cells. Is there a way to make the 2D array translucent and overlay the color array intsity graph behind it? is there a better way to do this. 
    I was able to get the closest current cell value to update as black and track around live on the intensity graph. I did this by temporarily setting the cell's value to 0. Is there a way to somehow highlight the actual cell on the 2D-Array instead? 
    The code is attached. I added a random sine wave input to simultate some signals for the x and y input. The Y array now runs in reverse order which made it tricky to get some of the functions to work properly so I had to use a 2D transpose and 1D reverse array to get it back in the right form. There's probably a better way to do this. 
    Any help is great appreciately and rewarded with Kuddos!  
    Attachments:
    3D Map Color Coded & Currsor (Rev B).vi ‏33 KB

  • Basic transpose (not a complex conjugate transpose) of a complex 2-D array

    Hi, folks
    Just ran an old analysis that I had written in v6.1 where a 2-D complex array is simply transposed (not complex conjugate) for further analysis. Now, under 7.1, the code gives crap results. I've noticed that now LabView automatically performs a complex conjugate transpose on the array. Obviously, not what I want.
    So, I changed the type to a real transpose, and which ends up truncating all the imaginary terms. No dice again.
    Has anybody out there come up with a solution?
    Would appreciate any help and/or empathy.
    Frustrated,
    Hunter

    Your anger is well founded. When these high level languages change routine functionality between versions, it can have disastrous results. And because it's an interchangeable piece, it could be buried deep within your code and you are on an Easter egg hunt to find why your code is broken.
    Version changes with complex code scare me.
    Sheldon
    Technical geek, engineer, research scientist, biodegradable...

  • How to quickly transpose 3d array?

    Dear all:
    I just  run into a strange problem. I have a 3d array, say, 400(page) x 55(rows) x 512(columns), and I would like to transpose it to 55(pages) x 512(rows) x 400(columns). I used the code as attached to this message. The speed is too slow. It takes more than 1.5 minutes in my machine. Can someone modify my code or give me some suggestion how to increase the speed? Thank you very much for your help.
    Attachments:
    convert.vi ‏17 KB

    Hi ccyang,
    your code was unnecesarily slow.
    And it was exponential (the more elements, the slower it got) because you resized the array at every for-loop iteration.
    On a 40x40x40 array your solution is 6 times slower, at 80x80x80 it is 12.
    Here's my solution:
    Ton
    Message Edited by TonP on 12-06-2006 08:26 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    convert_01.png ‏10 KB

  • Transpose array property

    Hello all,
    I am using LabVIEW 8.20.  I want to transpose an array of data in an XY graph, but the transpose array property node doesn't seem to work.  Not only that, but the "Transpose Array" option doesn't appear on the control's shortcut menu.  Is there something I should be doing/not doing prior to attempting the transposition?
    Thanks,
    Slowpoke
    Slowpoke
    CLAD (believe it or not!), using LabVIEW 8.5
    They don't call me "Slowpoke" for nothin'!

    The Transpose Array property simply swaps the X and Y arrays, though you can accomplish the same exact thing when you bundle the arrays. It's "Create->Property Node->Transpose Array" (with the whole list it's in the fourth section). What exactly doesn't work? Perhaps you should post your code. I believe this only appears on waveform graphs as a shortcut menu item.

  • How to delete columns from a 2D array

    Hi guys,
    I read a matrix from a text file and I want to delete the first and last columns of the matrix. I've been trying to do it with delete from an array function but it doesn't do it the way I want. Any suggestions?

    Keep in mind that by default, 2-D LabVIEW arrays are row-based. So though you might be thinking that the first indexing input for the 'index array' primitive is for columns, it is actually for rows. You can either select the second input for the 'index array', or, if you are like me and think better in columns, you can transpose the array before you operate on it. I recommend getting used to the order of the inputs for the array tools and forcing yourself into the LabVIEW convention, as it gets complicated if you need to invert an array before you operate on it, and then again after so that the array returns to row-centric order, which is what all the rest of the LV array tools are expecting
    Good luck!
    Wes Ramm, Cyth UK
    CLD, CPLI

  • How do I add a scroll bar to an array?

    I want to take a 2D array and change the row its is in with a scrollbar so that in a another array index I can pull out individual number from each row. 
    So I have a CSV file [time,1,2,3,4,5] and I want the user to able to vary the time with a scrollbar. 
    Thanks! 

    sofiakyle wrote:
    I want to take a 2D array and change the row its is in with a scrollbar so that in a another array index I can pull out individual number from each row. 
    So I have a CSV file [time,1,2,3,4,5] and I want the user to able to vary the time with a scrollbar. 
    A scrollbar is a cosmetic UI element that does not modify data (e.g. vary time) or "pull out numbers" (whatever that means).
    If you can only scroll through 8 values, maybe you need to transpose the array to swap rows with columns.
    LabVIEW Champion . Do more with less code and in less time .

  • Deleting data from a 2D array based on the id of the second column

    Hello
    I hope someone can help me. I have come across a hurdle in the programming of my application.
    1.
    I have a 2D array, the first column of this array contains my data and the second column contains an id, which is either 0 or 1.
    I have sorted this 2D array based on the id column so that the data corresponding to the 0’s is on top part of the array and the data corresponding to the 1’s follows it (on the bottom of the array).
    I want to delete that data (rows) of this sorted array that correspond to the 1’s and keep only the data (rows) that correspond to the 0’s.  
    So I would end up with a new 2D array that has only the data that I want on the first column and 0’s on the second column.
    I have hundreds of these 2D arrays resulting from my program (using a for loop) hence I want to automate this procedure. The length of the selected data arrays will vary.
    2.
    Once I can do this I will want to remove the id column (with the 0’s) from the 2D array and would like to build a new array with only the data from the first column (which may be of different length).
    So I want to end up with a 2D array with columns corresponding to the selected (1st column) data from the (original) 2D arrays. These data may be of different lengths so when building this new array I may need to do some padding. Will labview do this automatically?
    I hope that this is clear.
    Best wishes,

    Attached is a different approach - you don't need to do any sorting.
    The outer FOR loop assumes you have all the arrays available at once. If you are reading a file, modify it accordingly.
    You may or may not want the TRANSPOSE function on the final results, depending on what you want to do with it.
    Yes, when you assemble N-dimensional arrays into (N+1)-dimensional arrays, LabVIEW automatically pads for you.
    Enjoy.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks
    Attachments:
    Extract Marked Data.vi ‏40 KB

Maybe you are looking for

  • Sales Invoice prototype

    Can any body plz send me some prototype test for Sale Invoice, am using VBAK , VBAP and VBKD tables and any body plz explain how i have to do protype test for those transactions tht have to be there in Sales Invoice data extraction

  • Spry Menu Hover behavior

    First let me apologize and say I'm a total CSS noob and I know this is probably a simple issue for you CSS masters out there - but I'm at a loss :( My client wants a horizontal spry menu for her site. Instead of colors, she would like to use images f

  • Security settings for FMS

    Hi Guys and Girls, Im having a bit of a problem creating a stand alone cam exe projector that talks to my remote media server which in turn talks to a browser cam swf. All the browser based swf work fine but for some reason when I try and create a st

  • Array processing question

    Hello, I am somewhat new to JNI technology and am getting a bit confused about array processing. I am developing a C program that is called by a third party application. The third party application expects the C function to have a prototype similar t

  • Error using OSR10g with SOA Suite 11g

    Hi, I'm trying to configure a web service adapter in Jdev 11.1.1.2 in order to use the OSR (10g) to dinamically resolve the WSDL location and SOAP endpoint, but I always get an error like this: Exception: WSDLException: faultCode=PARSER_ERROR: Failed