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 Quote 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. Quote 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.