%function phase_plot(filename)

%%This file will attempt to open up see.out and phase.out and plot the
%%phase screen

%Ax=zeros(256,256);
%Ay=zeros(256,256);
name='A';
filename=strcat('see_',name,'.out')

see_file=fopen(filename);                   %Declare File handle pointing to filename
[seeing,count]=fread(see_file,'float');        %Take in values

for i=1:256,
    for j=1:256,
        Ax(i,j)=seeing(j+i*(j-1));
        Ay(i,j)=seeing(j+i*(j-1)+5);
    end
end

fclose(see_file);

see_x=strcat('see_',name,'.x');
see_x_handle=fopen(see_x,'w');

fprintf(see_x_handle,'%12.8e\n',Ax);

fclose(see_x_handle);