我有一个日期的日志文件,即:
LOG_20120509_100000.log
(year) (month) (day) _ (hour) (minute) (second)
Run Code Online (Sandbox Code Playgroud)
但想象一下,我想在一组每小时的日志文件上执行相同的操作.我希望能够这样做:
for i in 0:23
perform on LOG_20120509_%d0000.log, i
end
Run Code Online (Sandbox Code Playgroud)
但这对于小时不到10点钟的日志不起作用,因为它将成为:
LOG_20120509_50000.log
Run Code Online (Sandbox Code Playgroud)
那么如何在matlab中填充零?