LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

entering a matrix in a fomula knot results in "variable not defined" error

if i enter a matrix in a formula code, the program keeps telling me i have a undefined variable.
usually, matlab does work with code like "M=[123 456];" just fine.
the manual states, that in a formula knot code just works like it works in matlab.
what's my mistake?
0 Kudos
Message 1 of 2
(2,595 Views)
to use a matrix inside a formula node, you must declare a 2-dimensional array of the type you want to use. for example:
int32 y[2][2];

to assign values to the fields you can index them:
y[0][1] = 1;
you also could use a loop to put the values or pass a allready initialised array into the formula node.
Maybe these links also give you some hints:
problem regarding the formula node
array formula node

regards,
Robert H.
National Instruments
Message 2 of 2
(2,595 Views)