# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution
Highlighted

## transposing 2D array

Hi I have tried so many different things with this that i have got myself really confused,  what i am trying to do is transpose chucks on data see below for an data example.  i have tried to do this using for loops with indexing and by not using indexing.

the data is

 Test Name Min Max Result Test 1 1 5 3 Test 2 2 6 5 Test 3 3 7 4 Test 4 4 8 5 Test 1 1 5 3.5 Test 2 2 6 4 Test 3 3 7 5 Test 4 4 8 6 Test 1 1 5 2 Test 2 2 6 3 Test 3 3 7 5 Test 4 4 8 4.5

and i want it to be transposed like this,

 Test Name Test 1 Test 2 Test 3 Test 4 Min 1 2 3 4 Max 5 6 7 8 Result 3 5 4 5 Result 3.5 4 5 6 result 2 3 5 4.5

can anyone point me in the right direction.

Thanks

Message 1 of 25
(396 Views)

## Re: transposing 2D array

Dave76 wrote:

can anyone point me in the right direction.

No.  Because you haven't given us any VI to look at to see where the problem is in your program.

Message 2 of 25
(377 Views)

## Re: transposing 2D array

How about the transpose array vi?

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Message 3 of 25
(371 Views)

## Re: transposing 2D array

That's because i don't have a vi!

I am looking for a starting point.  i was hoping from the data i posted someone could suggest a way to do this.  i am not looking for someone to do this for me but shove me in the right direction.

Message 4 of 25
(369 Views)

## Re: transposing 2D array

if i use transpose, that the data it transposes all of it i am looking to transpose chunks of it based on the test name

Message 5 of 25
(368 Views)

## Re: transposing 2D array

We have no idea of the data structure you are using to hold the data (though it seems "natural" to me that it would be a 2D array of dbls).  We have no idea if you realize there is a Transpose 2D Array function on the Array Palette.  We have no idea if you are trying to write a file (and is it a "Spreadsheet file", a Text file, an Excel WorkSheet, or something else), and have no idea if some of the rows/columns represent data or are measures derived from the data.

Attaching your VI attempt (do not attach a "picture" of the Block Diagram) would possibly give us some clues.  A better description of what you are trying to do would also help.

Bob "I don't understand the Question" Schor

Message 6 of 25
(366 Views)

## Re: transposing 2D array

Dave76 wrote:

That's because i don't have a vi!

I am looking for a starting point.  i was hoping from the data i posted someone could suggest a way to do this.  i am not looking for someone to do this for me but shove me in the right direction.

But you do have a starting point.  You have whatever you have done so far that is not working for you.  How can you have something working wrong if you don't have a VI?

We can't shove you in the right direction because without code, we don't know which is the wrong direction you are already heading.

Message 7 of 25
(362 Views)

## Re: transposing 2D array

i understand your trying to help but you don't need to know the information your asking, the data i choose is arbitrary it can be anything its just the concept i am after trying to solve.  a post or 2 back i do mention transpose 2d array but this doesn't help me initially due to the way it works.  i didn't mention anything about writing to files that's irrelevant.

what i was asking was based on the data i posted as an 2d array

Message 8 of 25
(360 Views)

## Re: transposing 2D array

instead of telling me to post code that i don't have because i don't know where to start.  can i then ask how would you start to solve the problem i posted in the first post?

it is a 2d array lets say its a string what would i do the the first array to make it like the second?

Message 9 of 25
(357 Views)

## Re: transposing 2D array

But you DO have code!

In your original message you said:

"I have tried so many different things with this that i have got myself really confused,  what i am trying to do is transpose chucks on data see below for an data example.  i have tried to do this using for loops with indexing and by not using indexing."

So you have tried something, where is that code?

Message 10 of 25
(353 Views)