本博客中输出版本号和日期的子函数,今天才发现忘记上代码了,这里补上

function banner()

%% ------------------------------------------------------------------------
%% Output Info about matlab
%fprintf('\n***********************************************************\n'); [v, d] = version;
fprintf(' MATLAB Version: %20s\n\n', v);
fprintf(' Released Date: %17s\n\n', d); time_stamp = datestr(now, 31);
[wkd1, wkd2] = weekday(today, 'long');
fprintf(' Now is %20s, and it is %7s \n\n', time_stamp, wkd2);
%% ------------------------------------------------------------------------

  运行效果如下:

MATLAB中版本和日期函数-LMLPHP

还有其它参数,具体可参考帮助文件。

04-28 08:28