06-23-2005 11:56 AM
06-23-2005 12:01 PM
06-23-2005 12:06 PM
10-29-2020 10:22 PM
I want to do the same thing with my data, i.e. convert rows to columns.
But in my case, data is not a 2D array it is 4 or more rows that I need to format into columns.
I know about the 2D transpose function but how do we transpose 4D array?
Thanks! I appreciate any input.
10-29-2020 10:31 PM - edited 10-29-2020 10:32 PM
I think you4 terminology is confused. A 4D array is not 4 rows. It is an array that requires 4 indices. (column, row, page, volume) 4D arrays are pretty rare in programming. I have generated one myself for a project, but that is the only time in 35 years of programming.
It sounds like you do actually have a 2D array.
Did you try Transpose Array?
If you still think it doesn't work for you, then post a VI that contains your data saved as default, and shows what you want the data to look like after.
10-29-2020 10:43 PM
I have data in 4 rows...
I want to format them into columns as shown below:
I know this can be done in the excel file with a single click but I wanted to do this in the labview program...
I also wanted to add strings to the start of my data rows (/to be columns) so I can name the rows according to data type they are (shown in yellow highlight). It would be nice if you had any pointers on how to do that? Thank you so much!
10-29-2020 11:07 PM
I think I found a solution to transposing a large number of rows. I think I am going to convert my array to a matrix, transpose it, then convert matrix back to array for writing to my CSV file.
Thank you!
I would still appreciate if anyone has the answer to my question about appending a string to the start of your data row... How do I mark what row is what using text while my data is being written to a file? (add a name for each trace?)
10-30-2020 02:09 AM
Hi lodhi,
@lodhi33 wrote:
I think I found a solution to transposing a large number of rows. I think I am going to convert my array to a matrix, transpose it, then convert matrix back to array for writing to my CSV file.
No need to convert your 2D array into a matrix just for transposing: you can transpose 2D arrays as easily!
@lodhi33 wrote:
I would still appreciate if anyone has the answer to my question about appending a string to the start of your data row...
In an array all elements are of the same datatype: you cannot mix strings with numeric data in the same array.
Possible solutions: