Pad String with zero in matlab
===

I have a log file with a date, ie:

    LOG_20120509_100000.log
    (year) (month) (day) _ (hour) (minute) (second)

But imagine that i want to perform the same thing on a set of hourly log files. I want to be able to do this:

    for i in 0:23
        perform on LOG_20120509_%d0000.log, i
    end

But this wont work for the logs with hours of less then 10 oclock because it will become:

    LOG_20120509_50000.log

So how can i pad out the zeroes in matlab?