function plot_complex(in, FigNum, Option, Title)
% plot_complex(in, FigNum, Option, Title)
%	in	   Input data; can be complex
%	FigNum	   figure number to plot the data
%	Option	   0	nothing special
%		   1	plot with solid and dashed lines
%		   2	plot with 'x' and 'o'
%		   3	plot with 'x' and 'o' and solid and dashed lines
%	Title	   Text string for plot title

% 2009/03/05  Skips figure() command if FigNum==0.  For subplot()
% 2000/07/12  Added Title input
% 2000/07/05  Added nargin checks and Option input
% 2000/06/13  Written


%--- Init
len	= length(in);
if nargin < 2,
   FigNum  = 1;
end
if nargin < 3,
   Option  = 0;
end

%--- Main
if FigNum ~= 0
   figure(FigNum); clf;
end

if     Option == 3,
   plot(0:len-1, real(in), 'rx-'); hold on;
   plot(0:len-1, imag(in), 'bo--'); 
elseif Option == 2,
   plot(0:len-1, real(in), 'rx'); hold on;
   plot(0:len-1, imag(in), 'bo'); 
elseif Option == 1,
   plot(0:len-1, real(in), 'r-'); hold on;
   plot(0:len-1, imag(in), 'b--'); 
else                    % Normal
   plot(0:len-1, real(in), 'r'); hold on;
   plot(0:len-1, imag(in), 'b'); 
end

grid on; 

if nargin >= 4,
   title(Title);
end

