05-08-2009 10:18 AM
Hi,
I was having a problem with some Mathscript stuff but I found a workaround. Problem now is that I just don't understand why the workaround works...
I put a 1D column array into a Mathscript node and without doing anything to it, output it. BUT the output has been transposed. If I make it a 2D array but still with only values in the first column, this doesn't happen. Took me ages to figure this out but it doesn't really make sense to me why it would flip the 1D like that. I searched and all I got was this:
"The MathScript Node and the MATLAB script node handle 1D array inputs only by row"
from here: http://zone.ni.com/reference/en-XX/help/371361D-01/lvconcepts/scriptnodes/
Does that mean that anytime I want to use a 1D array with Mathscript I have to assume that no matter what it is going in, it's straight away going to get turned into a row by Mathscript? Is this a bug or is it on purpose? I've attached a VI to demonstrate it better than I can explain it.
I'm using 8.6 btw.
Thanks.
Solved! Go to Solution.
05-08-2009 10:58 AM
05-08-2009 10:59 AM - edited 05-08-2009 11:00 AM
I'm pretty sure rows and columns don't matter in 1D arrays because you still index them with a single number. You can drag out 1D arrays either horizontally or vertically when they are on the front panel.
Oh. I guess it would matter in mathscript..