LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array fill

Solved!
Go to solution

Hi guys,

 

I have an array (n rows, 1 column) and i want to create another column and fill it with progressive nombers from 0 to "n-1".

Someone could share with me this .vi?

thanks a lot

0 Kudos
Message 1 of 4
(2,181 Views)
Solution
Accepted by topic author Gquadro

Hi Gquadro,

 


@Gquadro wrote:

I have an array (n rows, 1 column) and i want to create another column and fill it with progressive nombers from 0 to "n-1".

Someone could share with me this .vi?


Why don't you share your VI to show what you have tried so far? Where are you stuck?

(Do you try us to do your homework for you?)

 

All you need is:

  1. an autoindexing FOR loop: wire your 1D array as input and wire the "i" value to an autoindexing output to create your "0 to N-1" array (basically the same as ArraySize with a Ramp function…)
  2. a BuildArray node
  3. a TransposeArray node

Other option, even easier:

  1. a FOR loop autoindexing your input array
  2. BuildArray inside the FOR loop, creating rows of the needed index value with the input value
  3. at the output tunnel you receive your 2D array without need for a TransposeArray afterwards

Try on your own and show what you got:

check.png

 

As you are asking very basic questions (also in your other thread): did you notice that "Training resources" section in the header of this LabVIEW board?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,170 Views)

thanks a lot for the advice! it was so helpful!

 

I started using labview 1 week ago for my thesis but i don't have knowledge about programming and i hope to learn it with practical examples.

 

 

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

Hi Gquadro,

 


@Gquadro wrote:

I started using labview 1 week ago for my thesis but i don't have knowledge about programming and i hope to learn it with practical examples.


You don't have any "knowledge about programming", but need it for your thesis?

Learning by "practical examples" is fine: LabVIEW comes with a huge example library to study. But still take care of those Training lessons…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,137 Views)