MATLAB: To save the data files numberig

process sequence of files

Is there any way to save the data as data file by numbering it automatically. I mean, this command should look if another file with same name is in the directory and if it is there it should put number at the end automatically. for each run it should save the file with the same name but with number in increasing order. For example, if I ask to save file with file name 'mydata', it should save mydata1 for first run, mydata2 for second run, mydata3 for third run so and so…….so that I don't need to manually change the name everytime whenever I save.