%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                 CI MADX Lectures                                             
%         O. Mete oznur.mete@cockcroft.ac.uk                                           
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Read the data file

filename = 'survey';
fileID1 = fopen([filename '.out']);
formatSpec = '%s %f %f %f %f %f %f %f %f %f %f %f %f %f %f';
Data = textscan(fileID1, formatSpec, 'headerlines',8);  
fclose(fileID1);

% Survey plot...

figure(1)
plot(Data{1,5}, Data{1,7},'b')
xlabel('x (m)')
ylabel('z (m)')
%xlim([-400 100])
set(gca, 'fontsize',18)
title('Survey Plot')
saveas(gca,'survey.eps','epsc');
