!  plots torques from a file which was written out by rotsol1.mac. These values were removed from
!  the .log file
!    m_rotm(i,0= index of the angle (mechanical)  (This array is printed out in tor_2d_"mname".log file)
!    m_rotm(i,j)= torque for each position
!        i=1,numcp  number of solutions
!        j = 1 torque on rotor by maxwells stress
!          = 2 torque on rotor by virtual work
!          = 3 torque on stator by maxwells stress
!          = 4 torque on stator by virtual work
_file='m_u1326f'
*set,dtor
*dim,dtor,table,39,4
dtor(0,0)=1e-6
dtor(0,1)=1
dtor(0,2)=2
dtor(0,3)=3
dtor(0,4)=4

*vread,dtor(1,0),%_file%,dat
(f7.0)

*vread,dtor(1,1),%_file%,dat
(7x,f10.0)

*vread,dtor(1,2),%_file%,dat
(17x,f10.0)

*vread,dtor(1,3),%_file%,dat
(27x,f10.0)

*vread,dtor(1,4),%_file%,dat
(37x,f10.0)

*vscfun,_angmx,max,dtor(1,0)
*vscfun,_angmn,min,dtor(1,0)
/xran,_angmn,_angmx

/axlab,y,Torque (oz-in)
/axlab,x,Angle (deg.)

*if,arg2,eq,0,then
 *vplo,dtor(1,0),dtor(1,1),2,3,4
*elseif,arg2,eq,1
 *vplo,dtor(1,0),dtor(1,1)
*elseif,arg2,eq,2
 *vplo,dtor(1,0),dtor(1,2)
*elseif,arg2,eq,3
 *vplo,dtor(1,0),dtor(1,3)
*elseif,arg2,eq,4
 *vplo,dtor(1,0),dtor(1,4)
*endif


/xra
/yra