02-19-2016 12:04 PM
Hi all,
I am dealing with mathscript nodes in LabVIEW and have some problems passing a 3D array (121*121*231) to the mathscript node.
I know the fact that mathscript nodes dont accept 3D arrays as inputs. So i am trying to create this 3D array inside of the mathscript node by accumulating 231 pages of 121*121 2D arrays.
But I am not able to perform this task and getting some error while accumulating 2D arrays inside mathscript node.
can anyone help me out to perform this sort little task of getting 3D array inside of the mathscript node?
Thanks in advance!
Rahul
Knorr-Bremse
Munich
02-20-2016 05:57 AM
02-20-2016 09:22 AM
Maybe because a 3D array is not 3 1D arrays? Consider [[[1, 2,3,4],[5,6,7,8]],[[9,10,11,12],[13,14,15,16]],[[17,18,19,20],[21,22,23,24]]], a 3 by 2 by 4 3D array. Which 3 1D arrays would you like to consider?
Maybe a better question is "Why use a Mathscript Node?" If you know anything about array "arithmetic", I'd think you could do in LabVIEW (almost) anything you could do in Matlab. What are you trying to compute?
Bob Schor
02-20-2016 09:28 AM
02-20-2016 09:40 AM
02-20-2016 09:45 AM
02-20-2016 09:58 AM
02-20-2016 12:24 PM
labview have matlab scripted nodes
I use it before it could comminute with matlab
did you try that ever you can put 2d array inside this scrip
so you by index array vi you can extract page of 3d array and use it with that may be it work !?
02-20-2016 12:50 PM
What is so difficult about using LabVIEW's Index Arrays to select 2D "pages" from a 3D Array? Here I create my favorite 3D array, display it as a 3D array (you have to scroll through the pages), then "Slice and Dice" it to let you choose an individual Page (showing Rows and Columns), an individual Row (showing Pages and Columns), or an individual Column (showing Pages and Rows). What could be simpler? Each gives you a 2D "slice" through one of the three Dimensions ...
Bob Schor