Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

How to substitude the values of array B in A without using DO loop?

TAGGED: 

    • Mehdi Baghaee
      Subscriber

      In APDL, If A and B are two arrays with the same dimentions, how is it possible to simply substitute the entire value of B in A without substituing one by one (using DO loop)?

      A=B , *SET, A, B and *VOPER, A, EQ, B produces error (Parameter A needs subscripts).

    • Ashish Khemka
      Forum Moderator

      Hi Mehdi,

      In APDL (ANSYS Parametric Design Language), you can substitute the entire value of one array into another without using a DO loop by using the *VOPER command. This command allows you to perform vector operations on entire arrays. Here’s how you can do it:

      *VOPER, A, B, COPY
      

      This command will copy all the values from array B into array A in one step, assuming both arrays have the same dimensions.

      *VOPER (ansys.com)

      Regards,

      Ashish Khemka

Viewing 1 reply thread
  • You must be logged in to reply to this topic.