acperrella Posted March 9, 2006 Report Posted March 9, 2006 Hello, This is stumping me and I'm sure it is becuase I don't really have a grasp on what the different formats are. Basically I have a string of Data coming in from a GPIB device. The comma seperated data can be of arbitrary length and is of the form: x1,y1,x2,y2,........ which I can read just fine. I'd like to make that into a cluster so I can plot it on an XY graph. What I tried to do is use "spreadsheet string to array" to make a 2D array, then index array to pull out row 0 and row 1, then use the bundle command to create an xy cluster. Any ideas? Is it possible that some of the data in the form 1.000e-4 or similar is causing a problem? Thanks, Andrew Quote
acperrella Posted March 9, 2006 Author Report Posted March 9, 2006 Hello, This is stumping me and I'm sure it is becuase I don't really have a grasp on what the different formats are. Basically I have a string of Data coming in from a GPIB device. The comma seperated data can be of arbitrary length and is of the form: x1,y1,x2,y2,........ which I can read just fine. I'd like to make that into a cluster so I can plot it on an XY graph. What I tried to do is use "spreadsheet string to array" to make a 2D array, then index array to pull out row 0 and row 1, then use the bundle command to create an xy cluster. Any ideas? Is it possible that some of the data in the form 1.000e-4 or similar is causing a problem? Thanks, Andrew OK, "spreadsheet string to array" can't be used since there is no EOL in the data. Another approach is needed. I'm going to try and brute force this with a for loop, but there seems like there should be an easier way. -Andrew Quote
jpdrolet Posted March 9, 2006 Report Posted March 9, 2006 OK, "spreadsheet string to array" can't be used since there is no EOL in the data. Another approach is needed.I'm going to try and brute force this with a for loop, but there seems like there should be an easier way. -Andrew You can indeed use spreadsheet string to array. Wire a 1D array to the array type input and a comma as delimiter. Quote
acperrella Posted March 9, 2006 Author Report Posted March 9, 2006 You can indeed use spreadsheet string to array. Wire a 1D array to the array type input and a comma as delimiter. Hi jpdrolet, That did work. I have a 1D string array with all of the original info. I'm still not sure how to split this single string into a cluster, but at least I've moved forward. Thanks, Andrew Quote
acperrella Posted March 10, 2006 Author Report Posted March 10, 2006 The Answer: I knew I missing something simple and that simple thing was "decimate array" It sucked out the even and odd terms of the converted string which I could then bundle into the cluster -Andrew Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.