%
%  data_convert_21.m  ver 1.0  
%  by Tom Irvine  Email: tomirvine@aol.com
%
%  This program converts Matlab data to ASCII text data.
%
%  A(:,j)is the j-th column of A
%  A(i,:)is the i-th row of A
%
   clear av;
   clear bv;
   disp(' ');
   disp(' This program converts Matlab data to ASCII text data. ');
   disp(' ');
   av = input(' Enter the Matlab time vector  ');
   n=length(av);
%
   bv = input(' Enter the Matlab amplitude vector  ');
%
   disp(' ');
   disp(' Enter the output filename: ');
   output_filename = input(' ','s');
%
   fid = fopen(output_filename,'w');
%   
   for i=1:n
       fprintf(fid,'%14.7e \t %14.7e \n',av(i),bv(i));
   end
   fclose(fid);