function w=plot_ell(SEMA, ECC, INC, PHA, IND) % % An auxiliary function used in ap2ep and ep2ap for plotting % tidal ellipse. The inputs, MA, ECC, INC and PHA are the output of % ap2ep and IND is a vector for indices for plotting a particular % ellipse, e.g., if IND=[2 3 1]; the ellipse corresponding to % the indices of (2,3,1) will be plotted. %___________________________ size_SEMA=size(SEMA); if nargin == 4; IND=1; %by default, the first ellipse is always plotted. end len_IND=length(IND); if IND cmd=['sub2ind(size_SEMA' ]; if len_IND==1 titletxt=['Ellipse ']; else titletxt=['Ellipse (']; end for k=1:len_IND; cmd=[cmd ',' num2str(IND(k))]; if k