ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Complex from comma separated string

A search only found my own posting from several years ago.

 

I am trying to convert a string in the format "3.7,5.6" to the complex 3.7+5.6i.The strings may include signs or 3.7e+00 notation. The images below show how I am doing it now.

 

comma string to complex.png  String to complex conversion.png

 

I could not find a way to use Scan form String or any other function to do this in one step. Does anyone see a better way? 

 

Thanks,

 

Lynn

0 Kudos
Message 1 of 4
(2,899 Views)

Here's what I would probably do. 😉

 

 

Message 2 of 4
(2,895 Views)

Thanks.  I thought I looked at that function but did not try that combination.

 

Lynn

0 Kudos
Message 3 of 4
(2,891 Views)

Just for kicks, here's also a RG style version. 😄

 

Message 4 of 4
(2,889 Views)