Convert 1D string Array to Numeric Array 
Author Message
 Convert 1D string Array to Numeric Array

I read a number of strings from GPIB card.They were divided by
comma.What i do is saving them in numeric form and plot in waveform
Control.Can somebody give some advice?


Sun, 19 Dec 2004 11:54:13 GMT  
 Convert 1D string Array to Numeric Array

Quote:

> I read a number of strings from GPIB card.They were divided by
> comma.What i do is saving them in numeric form and plot in waveform
> Control.Can somebody give some advice?

Hi Mark,
 if I've understood you correctly, you have say 5 elements in 1D
arrays of strings. Each element is related to a particular plot, so
each element is a comma deliminated string. You want to split this
into 5 1D numeric arrays, i.e. interpret each array element into a 1D
array, and pass this as an individual plot to a Waveform graph.

If this is so, try the following :
Place a for loop on the diagram. Wire the 1D array of strings to the
edge of the loop. Inside the loop place the Spreadsheet sting to
array.vi (found under the string functions). To this, wire the 1D
array, with indexing ON to the spreadsheet string input. To the format
string input, wire a string constant of "%f" (without the quotes). To
the deliminator, wire a string constant of "," (without the quotes),
and to the Array type input, wire a 1D array of double precision
numerics (easiest way is to use the wiring tool, right click on the
input and create constant. Then select the constant, and remove a
dimension.
Wire the output of the Spreadsheet string to array.vi to the for loop
edge, and (with indexing ON on this point too) wire this output
directly to the waveform graph.
If that's a bit confusing, e-mail me direct, and I have the .vi I've
proved it on.

Hope that helps

Sash.



Sat, 25 Dec 2004 17:13:52 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. convert 2d array to 1d array without using shift registers and build array

2. Join 1D three arrays together become a 1d array

3. Numeric and PIL: 1D array from 2D-tuple

4. convert a string array to a 2-d array

5. 1D binairy array (I16) to 2D array

6. convert 1D array to four individual numbers

7. convert 1d array to scalar

8. Change a 2D Array into a 1D Array.

9. 1d array containing means of a 2d array

10. Convert 1D array to Waveform

11. how to use 1D array as a multidimensional array

12. 2D array to 1D array

 

 
Powered by phpBB® Forum Software