05-24-2009 06:38 PM
hi,
Is there a way to split 3D array into three 1D arrays ?
Thank you
05-24-2009 06:41 PM
Sure -- how do you want to split it?
BTW, do you mean a 2-D array that is 3xn or a 3-D array? If the latter, all you have to do is use the index array fn and get the 3 1-D arrays. If you really do have a 3-D array, we would need to know how you want to split it.
Do you have any code that you are working on that you could upload?
05-24-2009 07:28 PM
No, you typically cannot split a general 3D array into 3 1D arrays. (You also cannot take 3 1D arrays and assemble them into a 3D array unless you do some padding.)
What you want is only possible for degenerate cases, such as if one of the three dimensions is 1. Of course you could reshape your 3D array into a 1D array with a size of the product of the three dimension and then slice it into three subsets, but that's probably not what you had in mind....
Can you give an example for a simple 3D array and what kind of output you expect once you apply the desired algorithm.
05-24-2009 07:49 PM
hello, thanks for the reply.
I already found the solution first reshaping my 3D array to 2D then I needed the values of the max from this 2D array so I used the max function to get the indexes of the max value ...
my initial idea was just to get those indexes by splitting the 3D to 3 separate arrays ..
05-24-2009 08:26 PM
That still makes not a lot of sense. what are the dimensions? Typically there are many possible 2D arrays and thus outcomes.
wrang wrote:I already found the solution first reshaping my 3D array to 2D then I needed the values of the max from this 2D array so I used the max function to get the indexes of the max value ...
05-24-2009 09:46 PM
from 3D array I need to get a 2D array of 168x9548 and then I'm selecting the max. but now actually I face another problem ... in matlab there is a function mesh which can draw nice 3D graphs but Labview doesn't have smth similar to it ... it is either surface or curve which is not what i want ...
How can I draw 3D graph having 2D array or 3D array ?
Thank you!
05-25-2009 12:43 PM
wrang wrote:from 3D array I need to get a 2D array of 168x9548 and then I'm selecting the max. but now actually I face another problem ... in matlab there is a function mesh which can draw nice 3D graphs but Labview doesn't have smth similar to it ... it is either surface or curve which is not what i want ...
How can I draw 3D graph having 2D array or 3D array ?
You are still giving us very little information. What was the size of the 3D array?
The mesh function is the same as a surface 3D graph, you would simply apply a color ramp for the z values and display the surface as a mesh. It's all there!!!
What is your LabVIEW version?
Why don't you attach a VI that has a typical 3D array as default value in a control or diagram constant.
05-27-2009 07:27 PM
hello,
I'm using Labview 8.5. Attached is a mock-up of what I'm trying to implement ...
Thank you !
09-11-2015 10:58 AM
09-11-2015 11:36 AM - edited 09-11-2015 11:51 AM
@NAS2000CO wrote:
its a exapmle for 2d and you can adjust it for 3d array too
Please don't post code util you have done some LabVIEW tutorials! Your entire code can be replaced by a single "index array", resized to two outputs and with a 0 wired to the upper column index. See image below.

(...and why are you using spoiler tags to hide the image???)
Additional style comments to your original code: