Code covered by the BSD License
function y = year(d) % Return the year, given a string date c = datevec(datenum(d(:))); y = c(:,1);
Contact us at files@mathworks.com