11-28-2014 11:55 AM
I have to check this on my other machine but I think it may work for my use case. Thanks
@Vinal_G wrote:
Done.
11-28-2014 12:10 PM
Can you give us a little bit of background information.
That kind of information would g a long way helping us understand and solve the problem.
At the moment is is just a puzzle to look for pattern where only a single example is available.
There are millions of possible solution that covert your input array to your output array. Most likely only one is correct.
11-28-2014 07:00 PM - edited 11-28-2014 07:00 PM
OK, I thought that Vinal's solution above looked overly complicated. Here's what I came up with instead... (LV 2013)
...seems to work just fine. 😄
12-01-2014 07:01 AM
Alright,
I have some background to this issue to clarify for everyone.
The array that I attached corresponds to a collection of parsed data files. I have been working on a sorting function to export to an Excel Spreadsheet that sorts Flow Rates from different devices into a sorted Row Column Array. The Column of 0's is there to actually work as a null and has no significance whatsoever but to clean up my data (I remove this at a later step).
I will attach my code too to clarify some more I have another VI previous to the compilation of this one that Parses the data from text files and sorts them into an array as well.
The reason for the sorting process here was to sort the indicies of the sorted arrays to line up in my output array accordingly so they would correspond to the correct sample number if there was a previous sample that did not contain a value under that particular Flow Rate Column.
I hope this works to clarify my particular problem.
Thanks for everyone's help and I hope that what you gave me works - I'll let you know later today.
Regards,
Mark
12-01-2014 11:14 AM
My code makes a few assumptions about the data, for example there cannot be any missing integer. e.g. if the dataset does not contain any "5" at all, the code would fail. If there is a possibility of missing values, a few very minor changes would need to be made.
12-01-2014 11:16 AM
Your assumptions are correct for my use case. There will always be a numerical progression that doesn't skip integers for this case. Thanks again.
@altenbach wrote:
My code makes a few assumptions about the data, for example there cannot be any missing integer. e.g. if the dataset does not contain any "5" at all, the code would fail. If there is a possibility of missing values, a few very minor changes would need to be made.
01-16-2015 07:32 AM
altenbach,
Ran into a problem that I found that I can't understand why it does this in your code.
Here is a screenshot showing the problem.
For some reason it cuts out my last index at the end. Do have an idea what is doing this?
Regards,
Mark
01-17-2015 11:48 AM
mark.eckhoff wrote:For some reason it cuts out my last index at the end. Do have an idea what is doing this?
Your array does not match the required specification for my code to work, because now your output array needs to be larger than the input array. If this is a possibility, you simply need to pad the original array with a sufficient number of rows of zeroes (e.g. using "reshape array") before starting or do some other conditional manipulation.
That should be easy to fix. See how far you get.