04-09-2007 11:10 AM
If you compare our 2 VIs you will see why yours is always a single element off. In my VI I use the "Index Array" function to get the 1D array of data. In your VI you have a for loop that you run n-1 times and build up the array. There is no need for your inner for loop, and you set it to run n-1 times. In my example I did not build the 2D array outside the cases, which is why I needed the extra build array inside. You should be fien with out that.
In side your cases you simple need an index array wired to the 2D array and then wire up the Columns index and away you go. The resulting array is the data you want.
04-10-2007 09:48 AM
Evan, or anyone willing,
I'm still having problems incorporating your method into my code. I don't see the similarities between our codes and find your indexing doesn't match what I require.
I was wrong having the subtract one (-1) in my For Loop and it was that which caused the number of elements in my X and Y arrays to not be equal - I forgot that "i" runs to N-1 anyway. I've fixed that now but the damn thing still won't plot. For case "two" I've placed indicators before and after build array; the first cluster is as it should be (has equal number of elements corresponding to X and Y values) but nothing comes through after the build array function.
Could you please have a look? Thank you.
04-11-2007 10:59 AM
It would be very helpful if you could post a VI with some sample data, that would help troubleshooting. If you have indicators on a cluster before the build array and then after the build array you can do the following:
In addition, I've posted a JPG showing what Evan was talking about with "removing the inner loop". You can take out the For loop and just use Index Array instead. If you don't wire a terminal of Index Array, it takes all the elements of that dimension. See the JPG and play around with the concept.
Michael