www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ReturnDayofWeekofaDateStringinCustomFormatExample.m

    %% Return Day of Week of Date String in Custom Format  
% Determine the day of the week for a date specified in the format |mmm.dd.yyyy|.
% Call |datenum| inside of |weekday| to specify the format of the input
% text representing a date. 
[DayNumber,DayName] = weekday(datenum('Dec.21.2012','mmmm.dd.yyyy'))