Jump to content
Jordy

is it possible to Divide or Multiply all array entries at once?

Recommended Posts

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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...