10-07-2009 08:25 PM
Hi,
I have created a formula node with an array output called al, but I get an error "you have connected a scalar type to an array with that type".
I declare the output as follows..
float64 al[len_as];
where len_as is an scalar input to the formula node.
It only works when I put a number as.
float64 al[5];
,but I don't know beforehand how many elements I need, so I cannot use this.
Please help! This is so stupid.
Thanks
10-07-2009 10:50 PM - edited 10-07-2009 10:51 PM
Don't define your array in your formula node.
Initialize the array as the size you want and pass it in as an input into the formula node.

Are you sure you even need to use a formula node? Can you implement your formula using all native LabVIEW functions?
10-08-2009 11:41 AM
Great idea, thank you!
I'm implementing some Matlab code that uses nested for loops that access arrays at all kinds of indexes. I think it will just be a total mess if implemented with native LabView code.
Regards
10-08-2009 01:55 PM
Hi mrsound,
usually LabView is very good at accessing arrays in For loops as it uses "auto-indexing". And even better: you can operate directly on arrays!
So you should ask for help on conversion of m-code to LV with some snippets from your code...
06-08-2017 12:32 PM
hello,sir
I want to store values in an array from formula node whose have two inputs. those two inputs are numeric one. output is also numeric. but i want to store the output numeric values in an array.
Thanking you sir,
Best regards,
santhosh.
06-08-2017 04:16 PM
06-09-2017 01:25 AM
hello sir, i am not using any for loop sir... i am accessing even and odd elements from an array using while loop, at every loop even and odd values will vary according to while loop iteration and giving both as input to formula node. formula node has one output depending upon even and odd values so that output value changes accordingly, I want to store those values in an array because i have to do further analysis
Thanking you sir,
Yours truly,
santhosh
06-09-2017 01:53 PM
06-11-2017 11:14 AM
I have forgotten that one sir....
Got the output!
Thank you sir,
Best regards,
Santhosh