Index: mttroot/mtt/bin/trans/m/write_matrix.m ================================================================== --- mttroot/mtt/bin/trans/m/write_matrix.m +++ mttroot/mtt/bin/trans/m/write_matrix.m @@ -5,10 +5,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.8 2004/09/12 22:27:27 geraint +% %% Appended 't' to fopen mode string to open in text mode. +% %% % %% Revision 1.7 2002/05/15 16:37:30 gawthrop % %% Added third argument (file extension) % %% % %% Revision 1.6 2000/12/27 16:06:17 peterg % %% *** empty log message *** @@ -47,13 +50,14 @@ [N,M] = size(matrix); for row = 1:N for col = 1:M value = matrix(row,col); - fprintf(filenum, '%g', real(value)); if is_complex(value) - fprintf(filenum, '+ %g*i', imag(value)); + fprintf(filenum, '%g*e^(%g*i)', abs(value),angle(value)); + else + fprintf(filenum, '%g', value); end if col