07-05-2012 08:19 AM
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?
07-05-2012 08:30 AM
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
07-05-2012 08:33 AM
there are 15 integers in the array.
07-05-2012 08:33 AM
Hi,
Here is one example which I suggest need some modification, regarding if you have "," or not.
07-05-2012 08:38 AM - edited 07-05-2012 08:38 AM
Oh, come now, you don't need any loops for this:
07-05-2012 08:49 AM
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?
07-05-2012 08:52 AM - edited 07-05-2012 08:53 AM
Or you can go the mathematical approach.
07-05-2012 09:12 AM
07-05-2012 09:40 AM
@GerdW wrote:
Hi crossrulz,
you don't need that exponential function:
Good call. If I would have thought about it tomorrow, I'm sure I would have came to the same conclusion.
07-06-2012 01:45 AM
@smercurio_fc wrote:
Oh, come now, you don't need any loops for this:
Nice! I didn't know you could connect arrays directly into the number->string conversion.