LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transposing 2D array

Solved!
Go to solution

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 

0 Kudos
Message 1 of 25
(4,915 Views)

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.

0 Kudos
Message 2 of 25
(4,896 Views)

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 ǝɥʇ'


0 Kudos
Message 3 of 25
(4,890 Views)

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.

0 Kudos
Message 4 of 25
(4,888 Views)

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

0 Kudos
Message 5 of 25
(4,887 Views)

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

0 Kudos
Message 6 of 25
(4,884 Views)

@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.

Smiley Frustrated

0 Kudos
Message 7 of 25
(4,880 Views)

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   

0 Kudos
Message 8 of 25
(4,878 Views)

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? 

0 Kudos
Message 9 of 25
(4,875 Views)

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?

0 Kudos
Message 10 of 25
(4,871 Views)