how can i saving information in sequential unique file name ?

Hi,every one.. in my project i inserting information from the interface and save information in .txt file
my problem is i want every time use interface that saving information in sequential unique file name .
for example i insert information then save it in .txt file and the name " person1.txt " then i close the interface . after that when i open interface and insert the information i want save it in .txt file and the name should be "person2.txt"
how can i do that ?
i hope you understand my problem..

Answers (1)

See the FAQ How_can_I_process_a_sequence_of_files? While this is specifically addressing opening existing files, creating sequential names for output is the same idea. You'll have to keep track of the next number to use in a persistent variable, perhaps, or some other way.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Asked:

on 21 Apr 2015

Commented:

on 21 Apr 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!