LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Surface Plot Helper To Dynamic Array

Solved!
Go to solution

Ah, yes. I suppose that that's the first thing I should've tried. 😅

 

Thank you, good sir.

0 Kudos
Message 11 of 14
(525 Views)

@CNLSN wrote:

I've tried your .vi and I'm receiving the numbers into the array but it looks something like:

 

Sensor 2 | Sensor 1          instead of             Sensor 1 | Sensor 2

Sensor 3 | Sensor 4                                       Sensor 3 | Sensor 4

 

Is there a way to define the placement of the sensors (paticulary, with respect to the graph)?

 


Are you sure about that? reshaping will keep the elements in memory order, so a 4 element 1D array input:

 

ABCD

 

reshape to 2x2 will result in:

 

AB

CD

 

Just look at the 2D array indicator. This does not translate to the graph, of course, because you can have an arbitrary viewpoint.

 


@CNLSN wrote:

Yes, of course - the strings look like "A11B12C13D14"..


 

So your values in the string are integers? Why are you scanning them as floating point?

0 Kudos
Message 12 of 14
(516 Views)

Correct, but were I to add more variables - say 2 X 3 - would that still result in:

 

ABC

DEF ?

 

That's correct. If I wanted to scan them as an integer only, would that be %g attached to the scan from string function?

0 Kudos
Message 13 of 14
(506 Views)

@CNLSN wrote:

That's correct. If I wanted to scan them as an integer only, would that be %g attached to the scan from string function?


No, you would use %d

 


@CNLSN wrote:

Correct, but were I to add more variables - say 2 X 3 - would that still result in:

 

ABC

DEF ?


It would have been faster to just test it instead of asking questions here. 😄 Of course you need to change the sizes accordingly when reshaping. (or calculate the number of columns from first principles if you always have two rows.)

0 Kudos
Message 14 of 14
(502 Views)