fl.ba...@googlemail.com
unread,Oct 21, 2008, 5:24:56 AM10/21/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MTEX
may be faster
in read_ctf.m
[...]
% Data file line by line
% Phase X Y Bands Error Euler1 Euler2 Euler3 MAD BC BS
%
status = fclose(fid);
EBSD_Array = dlmread(filename,'\t',17,0);
%
% NG=0;
% while ~feof(fid)
% EBSD_Line=textscan(fid,'%u %f64 %f64 %u %u %f64 %f64 %f64 %f64
%u %u',1,'delimiter','\t');
% % check that cell EBSD_Line is not empty
% if ~isempty(EBSD_Line{1})
% NG=NG+1;
% % copy cell EBSD_Line into numerical array EBSD_Array(NG,k)
% for k = 1:11
% EBSD_Array(NG,k) = double(EBSD_Line{k});
% end
% end
% end
%% Close the *.ctf File
% status = fclose(fid);
%
%% Search for indexed EBSD orientation pixels
NG = numel(EBSD_Array(:,1));
NINDEX = numel(EBSD_Array(EBSD_Array(:,1) > 0));
PERCENT=100.0*NINDEX/NG;
% % Counter for number of indexed points - NINDEX
% NINDEX=0;
% % Counter for number of indexed points per phase
% for K=1:NPHASES{1}
% NPHASE(K)=0;
% end
% for N=1:NG
% % phase index number = EBSD_Array(N,1)
% if EBSD_Array(N,1)>0
% % Indexed point
% NINDEX=NINDEX+1;
% % Indexed point with composition given by EBSD_Array(N,1)
% NPHASE(EBSD_Array(N,1))=NPHASE(EBSD_Array(N,1))+1;
% end
% end
% % Percentage of Indexed Pixels
% PERCENT=100.0*NINDEX/NG;
[..]
% nicer percentage
disp(sprintf(' Percentage of Indexed Pixels = %4.2f', PERCENT))