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: 

1D array to DBL?

Hi,

I've got a 1D array composed of multiple numbers such as {1,6,5,8,3,4}.I need to convert this to a DBL, in other words make it one number :165834.

How is this done? 

0 Kudos
Message 1 of 11
(4,781 Views)

How big is the array? Is it an array of integers? An array of strings? What you show is an integer as the final value, not a DBL

0 Kudos
Message 2 of 11
(4,770 Views)

there are 15 integers in the array. 

0 Kudos
Message 3 of 11
(4,766 Views)

Hi,

 

Here is one example which I suggest need some modification, regarding if you have "," or not.  

1.PNG

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
Message 4 of 11
(4,765 Views)

Oh, come now, you don't need any loops for this: Smiley Wink

 

 

Message 5 of 11
(4,753 Views)

that was what i was about to ask. how does it work, why is the for loop needed? so basically, we need to convert to a string, then re-convert to DBL. right?

0 Kudos
Message 6 of 11
(4,744 Views)

Or you can go the mathematical approach.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 11
(4,739 Views)

Hi crossrulz,

 

you don't need that exponential function:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 11
(4,731 Views)

@GerdW wrote:

Hi crossrulz,

 

you don't need that exponential function:

check.png


Good call.  If I would have thought about it tomorrow, I'm sure I would have came to the same conclusion.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 11
(4,725 Views)

@smercurio_fc wrote:

Oh, come now, you don't need any loops for this: Smiley Wink

 

 


Nice! I didn't know you could connect arrays directly into the number->string conversion. 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 10 of 11
(4,697 Views)