LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding individual cells from 3D array's pages to make one 2D array

Hi everyone,

 

Am a beginner, and have begun to like Labview. Especially because of great help available online (here) and other videos.

 

Have managed to use all basic functionalities, but when I tried to add cell(i,j) across all k's (pages) of my 3D array, I am out of wits. 

 

Tried Mathscript, but it doesn't handle 3D arrays. Eventually, Formula Node (C) came to rescue. Logic to do this is a no-brainer, but I don't know how to do it in Labview. Have tried things ranging from For loop, Insert into Array, Replace Array, Shift Register etc.

 

If someone can answer this, I would be happy to get embarassed.

 

Thanks

0 Kudos
Message 1 of 6
(3,051 Views)

Hi nskatlv,

 

This is one if the ways to do what you have described.

 

 

Add 3D Array Cells.png

Let me know if this helps.

 

Regards,

Chinmay

 

Chinmay Anand Misra
CLD
Technical Marketing Engineer
NI IndRA
Message 2 of 6
(3,033 Views)

Here's another possibility.

 

 

 

Or this...

 

Download All
Message 3 of 6
(3,026 Views)

Thanks Chinmay_NI !

 

Neat.

 

I could replicate it and it works like a charm. However, I could not understand what the first thing was under the 3D array before 'array size' element. I could solve it without using that.

 

Regards

0 Kudos
Message 4 of 6
(2,999 Views)

Thanks atnebach !

 

Simple and elegant. Thanks for the solutions. I tried both, and they work great.

 

Appreciate the effort and time you guys put in helping out newbees. 

 

Regards

 

 

PS: How can I accept two good replies as the 'accepted solutions' ? I guess we can only choose one.

0 Kudos
Message 5 of 6
(2,998 Views)

@nskatlv wrote:

Thanks Chinmay_NI !

 

Neat.

 

I could replicate it and it works like a charm. However, I could not understand what the first thing was under the 3D array before 'array size' element. I could solve it without using that.

 

Regards


The first thing is Index Array. My logic was I index the first plane of the 3D array, take its size (keeping in mind that all other planes will be of the same size), and initialize my resultant array to be a 0 array of that size. Of course, after seeing altenbach's solution, I realize all that was unneccesary.

 

Chinmay Anand Misra
CLD
Technical Marketing Engineer
NI IndRA
0 Kudos
Message 6 of 6
(2,983 Views)