how to create a .mat file with current time stamp in matlab?

matlab, time

Solution

Use `datestr` to format the time and use `now`to get the current time:

save(datestr(now,30))

Problem

I want to create a .mat file with current time stamp in matlab ? I want the name of the .mat file to be the current time.

Original source