12-07-2017 06:35 AM
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
Solved! Go to Solution.
12-07-2017 07:19 AM
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.
12-07-2017 07:22 AM
How about the transpose array vi?
12-07-2017 07:23 AM
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.
12-07-2017 07:24 AM
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
12-07-2017 07:27 AM
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
12-07-2017 07:32 AM - edited 12-07-2017 07:33 AM
@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.
12-07-2017 07:32 AM
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
12-07-2017 07:35 AM
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?
12-07-2017 07:38 AM - edited 12-07-2017 07:38 AM
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?