You can use string formatting to create the sequentially named diaries within a loop in matlab. Here is an example:
main.m221 chars7 lines
In this example, sprintf
is used to create a string with two digits for the loop counter. This string is then used to create the diary filename. The diary
command is used to create a file with the filename, and later the diary off
command is used to close the file.
This will create diary files with names "diary_01.txt", "diary_02.txt", "diary_03.txt", and so on.
gistlibby LogSnag