%%%%%%%%%%%%%%%%%%%%%%
%
%  s = strlenn(s, n) 
%                  
% This function takes a string s and if the length of s
% is greater than n then the string will place ... in the
% center to shorten the string.
%%%%%%%%%%%%%%%%%%%%%%
function [s] = strlenn(s, n)
if (length(s)>n)
    l = floor((n-3)/2);
    s = [s(1:l), '...', s(end-l:end)];
end