%% Align Blotched Handwriting Samples
% The files MATLAB1.gif and MATLAB2.gif contain two handwritten samples of the word "MATLAB®." Load the files. Add outliers by blotching the data.

samp1 = 'MATLAB1.gif';
samp2 = 'MATLAB2.gif';

x = double(imread(samp1));
y = double(imread(samp2));

x(15:20,54:60) = 4000;
y(15:20,84:96) = 4000;

%
% Align the handwriting samples along the x-axis using the edit distance. Specify a tolerance of 450.

edr(x,y,450);

% Copyright 2012 The MathWorks, Inc.