×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

*vmask and /noerase problem

*vmask and /noerase problem

*vmask and /noerase problem

(OP)
Hi,

I need to plot 7 curves per one graph in ansys and in the same time to use a *vmask command for each curve. So I wrote:

*DO,R1,1,P_1
  *DO,R2,1,P_2
    *DO,R3,1,P_3
     
      ...

      *DO,T0,1,10001
        /GOPR
        TAB_4(T0,R1)=TAB_3((T0-1)*0.01,1)
        *IF,TAB_4((T0-1)*0.01,R1),LE,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3)),THEN
          MASK(T0,R1)=1.0
          *ELSEIF,TAB_4((T0-1)*0.01,R1),GT,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3))
            MASK(T0,R1)=-1.0
        *ENDIF
      *ENDDO
    *ENDDO

    ...

    *VMASK,MASK(1,1)
    *VPLOT,TAB_4(1,0),TAB_4(1,1),2,3,4,5,6,7
   
      ...

it works OK, but I realized that only the first column of MASK was used. I decided to try a trick which was adviced me on this forum some time ago a I rewrote my code to:

*DO,R1,1,P_1
  *DO,R2,1,P_2
    *DO,R3,1,P_3
     
      ...

      *DO,T0,1,10001
        /GOPR
        TAB_4(T0,R1)=TAB_3((T0-1)*0.01,1)
        *IF,TAB_4((T0-1)*0.01,R1),LE,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3)),THEN
          MASK(T0,R1)=1.0
          *ELSEIF,TAB_4((T0-1)*0.01,R1),GT,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3))
            MASK(T0,R1)=-1.0
        *ENDIF
      *ENDDO
    *ENDDO
 
    ...

    /ERASE
    /REPLOT
    /NOERASE
    /REPLOT
    *DO,T0,1,7
      *VMASK,MASK(1,T0)
      *VPLOT,TAB_4(1,0),TAB_4(1,T0)
    *ENDDO

    ...

... but then obtained an error message like this:

TAB_4 is dimensioned as 10001x7 but the second subscript requested is 10001 ...

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources