09-09-2016 03:58 PM
Solved! Go to Solution.
09-09-2016 06:17 PM
Could you supply some example data that show the input and what you expect as an output. Preferably, do this with a VI by setting the values and then setting them as default before posting the VI.
09-09-2016 07:24 PM
09-10-2016 07:01 AM
Showing us the Spreadsheet was helpful in understanding the problem. Why don't you look at the Spreadsheet and think (not in terms of LabVIEW, necessarily) what steps you would take to solve the problem. For example, I thought of "Do something with Column 1", "Do something with Column 2", then "Process each row".
Now once you have a "thought algorithm" in mind, think about how you might implement that in LabVIEW. What sort of data structure(s) would be helpful? How would you use them to carry out the steps of your Thought Algorithm?
Now try writing the code. If you get stuck, attach your code (and it would also help to attach the data file you are trying to analyze so we don't have to "make it up ourselves").
Bob Schor
P.S. -- if you do attach code, attach it as a VI or a LabVIEW Snippet, something we can edit and execute.
09-10-2016 11:33 AM
What you want to do is simply a 2D histogram.
Get all unique entries from each column and assign them an index.
Initialize a 2D I32 array with sizes corresponding to the number of unique items
Iterate over all rows and increment the Corresponding array element with each iteration.
Create a table where the row and column headers correspond to the unque entries and the body of the table contains the counts.
09-11-2016 09:55 PM
I understand what you are saying, but I still have a problem.
I started making some progress, but the thing is I have to columns not just one, and I eliminated the repetitions in both, but now I don't know how to make the comparison, and add the values to a table. I will leave the vi in the description.
Any help will be greatly appreciated.
Thanks.
09-12-2016 12:10 AM
OK, to get a column, you would just use "index array". No loops needed. 😄
See if the attached example can give you some ideas.
09-12-2016 05:16 AM
09-12-2016 05:25 AM
09-12-2016 08:10 AM
Several days ago, I gave you an algorithm to do what you describe. I'll do it again:
Try coding this up yourself. It is not difficult if you have a basic understanding of LabVIEW, loops, Arrays, and String processing (particularly telling if strings are equal or not, thinking about "Does Upper/Lower Case matter?").
Bob Schor