07-09-2010 10:55 AM - edited 07-09-2010 11:01 AM
I have an output in the form of a string that looks like this
N-150.00E-15,N-49.998E-15,N 150.00E-15,N-99.996E-15,N-49.998E-15,N 0.0000E+00,N 100.00E-15,N-49.998E-15,N-150.00E-15,N-49.998E-15,N 150.00E-15,N-49.998E-15,N-99.996E-15,N-99.996E-15,N 100.00E-15,N-150.00E-15,N-49.998E-15,N-49.998E-15,N 50.000E-15,N 50.000E-15,N 50.000E-15
First of all I would like to know how to sort this, I guess into an array, using the commas as the seperators. After that it would be good to loose the N's, then I would like to save the array as a text file or something spreadsheet maybe??
I sort of know what I am doing but I need a bit of direction, like what things to use etc..
Can anyone point me in the right direction??
Thanks
07-09-2010 11:01 AM
you are on the right track.
How do you want to display the info?
07-09-2010 11:04 AM
how do you mean?
I guess I want to display it like in a spreadsheet so I can import it into excel or other similar programmes, i will need to convert the +E things as well I guess.
For now just an output array on the front panel would be nice.
Is that what you mean?
07-09-2010 11:04 AM
Spreadsheet string to Array using comma as a delimter will produce the array. So you got that part right. Then use Sort 1D Array. To lose the N's you could use String Subset with an offset of 1. This will remove the first character. Use either Array to Spreadsheet String to save to a string, or use Write to Spreadsheet File (in file palette) to write the array to a file in spreadsheet format.
Your presumptions were correct. Just learn the functions.
07-09-2010 11:06 AM
looks like a plan, thanks
07-09-2010 11:09 AM - edited 07-09-2010 11:10 AM
The first part would be to convert your string into an array of strings.
You can do that by using the "Spreadsheet String to Array".
You can then sort the array as you wish. Then...
07-09-2010 11:11 AM
@tbob wrote:
Spreadsheet string to Array using comma as a delimter will produce the array. So you got that part right. Then use Sort 1D Array. To lose the N's you could use String Subset with an offset of 1. This will remove the first character. Use either Array to Spreadsheet String to save to a string, or use Write to Spreadsheet File (in file palette) to write the array to a file in spreadsheet format.
Your presumptions were correct. Just learn the functions.
tbob...
You're playing with your ESP gift again. Better not let Ben catch you 😉 LOL!!
07-09-2010 11:11 AM - edited 07-09-2010 11:13 AM
@tbob wrote:
Spreadsheet string to Array using comma as a delimter will produce the array. So you got that part right. Then use Sort 1D Array. To lose the N's you could use String Subset with an offset of 1. This will remove the first character. Use either Array to Spreadsheet String to save to a string, or use Write to Spreadsheet File (in file palette) to write the array to a file in spreadsheet format.
Your presumptions were correct. Just learn the functions.
tbob...
You're playing with your ESP gift again. Better not let Ben catch you 😉 LOL!!
I hit the post button twice as it seemed to be stuck/frozen..
07-09-2010 11:20 AM
I dont get how you've wired up the array type tab
07-09-2010 11:26 AM
Are you talking about the empty string array? On the Array palette you can grab the Array Constant. It shows up in black on the block diagrm. Then grab a string constant and drag it into the black box. Voila. You have an empty string array.