Jordy Posted March 29, 2020 Report Share Posted March 29, 2020 Hi, I'm looking for a method to divide or multiply all entries in an array by the same number and store this into another array. [1,2,0,1,0,0,1.....] x 20 = [20,40,0,20,0,0,20,....] Is there any way to do this without generating a loop. (the MUL and DIV functions doesn't support an array as input.) UDFB or c code? Thanks Link to comment Share on other sites More sharing options...
AlexUT Posted March 29, 2020 Report Share Posted March 29, 2020 There is no such function for array. You can write UDFB to do this. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted March 29, 2020 MVP 2023 Report Share Posted March 29, 2020 Depending on EXACTLY what math you want to do, the old Visilogic Linearize Array would do it. I ran into this trying to convert a Visilogic program to UniLogic. The following post addressed this problem, including an attached UDFB: http://forum.unitronics.com/topic/6080-adventures-in-unistream-conversion-vect-linear/?tab=comments#comment-24545 Joe T. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now