I have attached a simple VI wherein I want to take an input array, look at its size and use the size of the input array as the size of the output array. The output array needs to be declared. I want to be able to use the size of the input array "N" as the size of the output array too. The size of the input array changes dynamically based on my simulation needs. I dont want to modify the size of the array in the declaration every time I change the array size in simulation.
I have tried using b[N] instead of b in the formula node. However LV does not seem to accept this and gives me a syntax error.
Thanks for the reply. I am aware of this method. However I require to use complicated formulas such as
0.02 * (((x1 - 😎 ^ 2 + (x2 - 6) ^ 2) + 15 * Abs((x1 - 2) * (x2 - 4)) - 400 * Exp(-((x1 - 9) ^ 2 + (x2 - 9) ^ 2))).
This is the reason I want to use a formula Node.
However I require to use complicated formulas such as
If a simple formula is easier in G, a complicated formula will also be easier in G.
Actually, it will scale better. Since graphical code is 2D, doubling the code will make it only 1.4x (sqrt2) larger in each dimension, while the formula will double in lenght. 😄