LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Z Matrix in "3D Surface.vi"

in
Graphes & Sound-> 3D Graph Properties -> 3D Surface.vi

There is a 2-D array input called Z-matrix.

How can we generate this Z-matrix based on 3 1-D array called x array, y array and z array?

Thanks
Message 1 of 7
(4,847 Views)
Use your x and y array to generate a coordinate for the corresponding value in the z array. Then make the matrix and use this coordinate and place the z value in the coordinate. I think this is the solution you are looking for.
0 Kudos
Message 2 of 7
(4,846 Views)
I have put together a sample vi which might help.
Message 3 of 7
(4,846 Views)
I have a related but inverse problem. I have a z-matrix which is the output of JTFA operations. I need to break this z-matrix down into the component x-vector and y-vector so as to correctly scale the x axis for relative time -- including a specifiable dX value -- and the y axis for spectral bin number. This can be done by formatting options within the native LV Intensity Graph. Unfortunately, cwGraph3D is an imported VB control and uses the VB convention for time. Also, whatever array operations are needed to do this need to be highly optimized because of how frequently this display will be updated. Although there is a knowledgebase about time as x-axis, it really doesn't solve the problem of concurrently specifying the y-axis in a dynamic fashion.

So far NI h
as not been very helpful except to generate a Corrective Action Request about it.

Can anyone help out?
0 Kudos
Message 4 of 7
(4,846 Views)

Hi, i noticed that in 3D surface VI, it requires both X,Y, and Z to be of 2D matrix. How do you genererate a 2D matrix from 1D coordinate data?

0 Kudos
Message 5 of 7
(3,840 Views)

@Olataro wrote:

Hi, i noticed that in 3D surface VI, it requires both X,Y, and Z to be of 2D matrix. How do you genererate a 2D matrix from 1D coordinate data?


You can change the mode with the polymorphic selector. Select "plot helper(vector)" instead of "plot helper(Matrix)" or "automatic".

0 Kudos
Message 6 of 7
(3,838 Views)

I see, thnx! Just for clarification are coordinate data considered as matrix or vector? As i have seen previous work state that they are using coordinate data but uses the "vector" setting.

 

Still i have problems with the understanding of the Z matrix. Reading the labview tutorial

 

http://zone.ni.com/reference/en-XX/help/371361H-01/lvpict/3d_surface/

 

"The values of x vector and y vector specify where the corresponding point in the z matrix should be located. The default values for x vector and y vector are 0, 1, 2, 3, and so on. The first point in z matrix (index 0,0) is located at (x vector[0], y vector[0]), or (0,0). If you change x vector to –1, 1, 2, 3, and so on, the first point in z matrix moves to (–1,0)."

 

So does that mean Z matrix is actually the merging of  the 1D x and 1D y array? If so, then as i have X,Y and Z coordinate data, where and how am I suppose to insert and integrate the Z coordinate value?

0 Kudos
Message 7 of 7
(3,831 Views)