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: 

insert into array different sizes

Hello,

 

  This is great...if you change to the build array you can insert as many 2D arrays into a 3d array with each 2 d array in its own page. However Labview pads the smaller arrays with zeroes. Is there a way to have Labview pad the smaller arrays with a "NAN"

Regards,


Kaspar
0 Kudos
Message 11 of 18
(2,021 Views)

@Kaspar wrote:

This is great...if you change to the build array you can insert as many 2D arrays into a 3d array with each 2 d array in its own page. However Labview pads the smaller arrays with zeroes. Is there a way to have Labview pad the smaller arrays with a "NAN"


LabVIEW is a full featured programming language, so everything is possible with a little bit of coding. Have you tried?

 

0 Kudos
Message 12 of 18
(2,017 Views)

Hello,

 

  Yes I did look at the "build array" and the help for it. I did not find anything that defines the "padding/filler" value for numeric arrays. Does anyone know where this is defined?

Regards,


Kaspar
0 Kudos
Message 13 of 18
(2,002 Views)

Hi Kaspar,

 

You know the row and/or column from which it is getting padded with 0s, right? Use Replace Array Subset function & wire the appropriate row & column indices to replace all unwanted 0s with NaN.

 

Hope it helps.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 14 of 18
(1,993 Views)

Hi,


     A comment related: I was looking for have 1d arrays with diferent size into a 1d array, i found that is only possible if you put 1d arrays at cluster and later inside of 1d array.

Best Regard,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 15 of 18
(1,908 Views)

I m not sure if I understood what you mean.

 

Insert Into Array function is used to Insert an element or N/N-1 dimension array into an N dimension array at a specified index.

 

Hope it helps.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 16 of 18
(1,905 Views)

Array Into Array.PNG

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 17 of 18
(1,898 Views)

 

 


@Luis_AM3C wrote:

 

     I was looking for have 1d arrays with diferent size into a 1d array...



Now I understood your requirement after seeing the code. Smiley Happy Yeah, this is possible only with cluster(s).

 

Thats why it is often said (in these forums) that a pcture is worth a 1000 words. Smiley Wink

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 18 of 18
(1,892 Views)