Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting 1D array in 3DSurfaceGraph

Hey, I am just wondering, are there any ways to use 1D Array/Vector as the third parameter in 3DSurfaceGraph or do we have to use a 2D Array/Matrix in 3DSurfaceGraph? Thanks.
0 Kudos
Message 1 of 4
(3,059 Views)
There is no method on CNiGraph3D called 3DSurfaceGraph, so it's not clear which method (and overload) that you're asking about. Are you asking about Plot3DSurface or Plot3DSimpleSurface and if so, which overload? In general, if the prototype of the method specifies a matrix for a parameter, you must specify a matrix and vector is not an option. Depending on what you're trying to do you could try creating a matrix that has a single row and passing that for the parameter.

- Elton
0 Kudos
Message 2 of 4
(3,059 Views)
If you don't know the size of array, and want to use say "malloc," you cannot create a 2-D array using it; however, dynamically creating a 1-D array using "malloc" is no problem. Then, given the 1-D array created by "malloc," how can I apply it to Plot3DSurface?
0 Kudos
Message 3 of 4
(3,059 Views)
Malloc'ing a 1D array vs. a 2D array doesn't matter since the CNiGraph3D methods don't accept arrays anyway - you ultimately have to convert to Measurement Studio vector/matrix types to specify to the methods. Please refer to the previous discussion about converting C array types to Measurement Studio data types to pass to the CNiGraph3D methods.

- Elton
0 Kudos
Message 4 of 4
(3,059 Views)