Search code examples
labview

how do you flatten and unflatten an array of doubles in labview?


I have created a simple LabView program shown below that attempts to flatten an array [1,0,3] and then unflatten it and print out the contents.

However, I am unsuccessful in doing so. What am I doing wrong?

enter image description here


Solution

  • What am I doing wrong?

    You're not going through tutorials or you're not reading the context help for the unflatten function (Ctrl+H) or you're not reading the full help for the function (right click>>Help) or you're not looking at the examples (from the help or Help>>Find Examples). Take your pick (preferably all four).

    If you want an actual answer it is that LV is strictly typed, and therefore you need to tell the unflatten function which data type you want it to output (1D DBL array) and you're not doing that, but the real answer is what's in the previous paragraph - you should use those tools to learn how to find such an answer yourself.