I am using the diary function to store simulation results into a txt file, e.g. diary('TextLog.txt') however I expect to have around 50,000 rows of data and so not all my data will be stored. Is there anything I can do to specify the size of the file? Am I right in thinking the file will only hold what is displayed in the Command Window? If so, is there a way to change this? Unless there is a different command I can use? Thanks if you can help!