LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert a string (an indicator with numbers separated by "," : every alternate number is real and complex values of my desired output) to a 2 D array ? And I would like to plot on a waveform graph

Hello Guys, 

 

I have my raw output data from the network analyzer read as a string separated by ",". I want it to be displayed as a 2D array and want to plot it on a waveform graph. I have tried certain things suggested in the forum, but some help is really appreciable.

 

Thanks in Advance!!!   

0 Kudos
Message 1 of 6
(3,037 Views)

If it's a 2D array: Is there another delimiter than ","? How will you decide when a line is finished?

 

Other than that you could use the Match Pattern Function in a while loop to search for the "," and then convert the string before into a number and build it into an array.

 

Edit: After reading the title again I asumme, you want one column for real and one for imaginary numbers. The solution however, is the same, you could use the match pattern function twice in one iteration, then each iteration gives you one real and one complex number.



Remember Cunningham's Law
0 Kudos
Message 2 of 6
(3,026 Views)

Is this what you mean?

 

arrayting.png

______________________________________________________________


______________________________________________________________
Message 3 of 6
(3,020 Views)

I wonder why you want to plot the real and imaginary parts separately? Shouldn't you be better using an XY graph?

 

toGraph.png

 

Ben64

0 Kudos
Message 5 of 6
(2,923 Views)

@ben64 wrote:

I wonder why you want to plot the real and imaginary parts separately? Shouldn't you be better using an XY graph?

 

toGraph.png

 

Ben64


Just to try to keep Ben64 off thr RG thread (Shhh. ) 😄

Capture.PNG

 

Somatimes its easier to see IQ data this way

Capture.PNG


"Should be" isn't "Is" -Jay
Message 6 of 6
(2,887 Views)